From 7bf967f05f19f48b35d9d3e60b43b09ac40ad3f8 Mon Sep 17 00:00:00 2001 From: Jupeyy Date: Wed, 30 Mar 2022 19:03:39 +0200 Subject: [PATCH] Check if the resolution is "really" not supported before applying desktop resoltution --- src/engine/client/backend_sdl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/client/backend_sdl.cpp b/src/engine/client/backend_sdl.cpp index 50e317d31..fb73c3f74 100644 --- a/src/engine/client/backend_sdl.cpp +++ b/src/engine/client/backend_sdl.cpp @@ -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;