Skip to content

Commit

Permalink
engine: platform: sdl: disable restoring desktop resolution for mobil…
Browse files Browse the repository at this point in the history
…e platforms, as it leads to unwanted window minimize (which correctly implemented by SDL by the way)
  • Loading branch information
a1batross committed Jul 9, 2024
1 parent 6728b84 commit 1c84a5c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion engine/platform/sdl/vid_sdl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 1c84a5c

Please sign in to comment.