mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Who doesn't enjoy fixing Windows stuff?
This commit is contained in:
parent
8b5ee98193
commit
81c6d0b33c
|
@ -594,13 +594,29 @@ int CGraphicsBackend_SDL_OpenGL::Init(const char *pName, int *Screen, int *pWidt
|
||||||
*pDesktopHeight = DisplayMode.h;
|
*pDesktopHeight = DisplayMode.h;
|
||||||
|
|
||||||
// use desktop resolution as default resolution
|
// use desktop resolution as default resolution
|
||||||
#ifndef __ANDROID__
|
#ifdef __ANDROID__
|
||||||
|
*pWidth = *pDesktopWidth;
|
||||||
|
*pHeight = *pDesktopHeight;
|
||||||
|
#elif defined(CONF_FAMILY_WINDOWS)
|
||||||
if(*pWidth == 0 || *pHeight == 0)
|
if(*pWidth == 0 || *pHeight == 0)
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
*pWidth = *pDesktopWidth;
|
*pWidth = *pDesktopWidth;
|
||||||
*pHeight = *pDesktopHeight;
|
*pHeight = *pDesktopHeight;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
float dpi;
|
||||||
|
SDL_GetDisplayDPI(0, NULL, &dpi, NULL);
|
||||||
|
pWidth /= dpi;
|
||||||
|
pHeight /= dpi;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
if(*pWidth == 0 || *pHeight == 0)
|
||||||
|
{
|
||||||
|
*pWidth = *pDesktopWidth;
|
||||||
|
*pHeight = *pDesktopHeight;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// set flags
|
// set flags
|
||||||
int SdlFlags = SDL_WINDOW_OPENGL | SDL_WINDOW_HIDDEN;
|
int SdlFlags = SDL_WINDOW_OPENGL | SDL_WINDOW_HIDDEN;
|
||||||
|
|
Loading…
Reference in a new issue