Skip to content

Commit

Permalink
Move screensaver hint inside SLD_WasInit scope
Browse files Browse the repository at this point in the history
  • Loading branch information
Aciz committed Nov 6, 2023
1 parent 991459c commit ef094af
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/sdl/sdl_glimp.c
Original file line number Diff line number Diff line change
Expand Up @@ -551,11 +551,6 @@ static rserr_t GLimp_StartDriverAndSetMode( int mode, const char *modeFS, qboole
fullscreen = qfalse;
}

if ( r_sdlAllowScreenSaver->integer )
{
SDL_SetHint( SDL_HINT_VIDEO_ALLOW_SCREENSAVER, "1" );
}

if ( !SDL_WasInit( SDL_INIT_VIDEO ) )
{
const char *driverName;
Expand All @@ -565,6 +560,11 @@ static rserr_t GLimp_StartDriverAndSetMode( int mode, const char *modeFS, qboole
SDL_setenv("SDL_VIDEODRIVER", r_sdlDriver->string, 0 );
}

if ( r_sdlAllowScreenSaver->integer )
{
SDL_SetHint( SDL_HINT_VIDEO_ALLOW_SCREENSAVER, "1" );
}

/*
Starting from SDL2 2.0.14 The default value for SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS
is now false for better compatibility with modern window managers, however it
Expand Down

0 comments on commit ef094af

Please sign in to comment.