From 1c84a5c8ade7cfac17d6b558669d4f721a0bf11f Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Tue, 9 Jul 2024 19:52:11 +0300 Subject: [PATCH] engine: platform: sdl: disable restoring desktop resolution for mobile platforms, as it leads to unwanted window minimize (which correctly implemented by SDL by the way) --- engine/platform/sdl/vid_sdl.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/engine/platform/sdl/vid_sdl.c b/engine/platform/sdl/vid_sdl.c index e709afeb9..dc5fb11d2 100644 --- a/engine/platform/sdl/vid_sdl.c +++ b/engine/platform/sdl/vid_sdl.c @@ -633,7 +633,10 @@ static qboolean VID_SetScreenResolution( int width, int height, window_mode_t wi void VID_RestoreScreenResolution( void ) { -#if SDL_VERSION_ATLEAST( 2, 0, 0 ) + // on mobile platform fullscreen is designed to be always on + // and code below minimizes our window if we're in full screen + // don't do that on mobile devices +#if SDL_VERSION_ATLEAST( 2, 0, 0 ) && !XASH_MOBILE_PLATFORM switch((window_mode_t)vid_fullscreen.value ) { case WINDOW_MODE_WINDOWED: