mirror of
https://github.com/ddnet/ddnet.git
synced 2024-09-20 01:24:18 +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;
|
||||
|
||||
// use desktop resolution as default resolution
|
||||
#ifndef __ANDROID__
|
||||
#ifdef __ANDROID__
|
||||
*pWidth = *pDesktopWidth;
|
||||
*pHeight = *pDesktopHeight;
|
||||
#elif defined(CONF_FAMILY_WINDOWS)
|
||||
if(*pWidth == 0 || *pHeight == 0)
|
||||
#endif
|
||||
{
|
||||
*pWidth = *pDesktopWidth;
|
||||
*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
|
||||
int SdlFlags = SDL_WINDOW_OPENGL | SDL_WINDOW_HIDDEN;
|
||||
|
|
Loading…
Reference in a new issue