mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Check if the resolution is "really" not supported before applying desktop resoltution
This commit is contained in:
parent
8a942a21dd
commit
7bf967f05f
|
@ -995,7 +995,7 @@ int CGraphicsBackend_SDL_GL::Init(const char *pName, int *pScreen, int *pWidth,
|
|||
bool IsFullscreen = (SdlFlags & SDL_WINDOW_FULLSCREEN) != 0 || g_Config.m_GfxFullscreen == 3;
|
||||
// use desktop resolution as default resolution, clamp resolution if users's display is smaller than we remembered
|
||||
// if the user starts in fullscreen, and the resolution was not found use the desktop one
|
||||
if((IsFullscreen && !SupportedResolution) || *pWidth == 0 || *pHeight == 0 || (IsDesktopChanged && (*pWidth > *pDesktopWidth || *pHeight > *pDesktopHeight)))
|
||||
if((IsFullscreen && !SupportedResolution) || *pWidth == 0 || *pHeight == 0 || (IsDesktopChanged && (!SupportedResolution || !IsFullscreen) && (*pWidth > *pDesktopWidth || *pHeight > *pDesktopHeight)))
|
||||
{
|
||||
*pWidth = *pDesktopWidth;
|
||||
*pHeight = *pDesktopHeight;
|
||||
|
|
Loading…
Reference in a new issue