mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-10 08:38:20 +00:00
[client] fix screensaver enable
The hint "SDL_HINT_VIDEO_ALLOW_SCREENSAVER" only works if set before SDL_Init(). Move it to the proper location.
This commit is contained in:
parent
0b890ed1ac
commit
1727c7726b
@ -1840,6 +1840,9 @@ static int lg_run()
|
||||
}
|
||||
}
|
||||
|
||||
if (!params.noScreensaver)
|
||||
SDL_SetHint(SDL_HINT_VIDEO_ALLOW_SCREENSAVER, "1");
|
||||
|
||||
if (SDL_Init(SDL_INIT_VIDEO) < 0)
|
||||
{
|
||||
DEBUG_ERROR("SDL_Init Failed");
|
||||
@ -1954,12 +1957,6 @@ static int lg_run()
|
||||
if (params.fullscreen)
|
||||
SDL_SetWindowFullscreen(g_state.window, SDL_WINDOW_FULLSCREEN_DESKTOP);
|
||||
|
||||
if (!params.noScreensaver)
|
||||
{
|
||||
SDL_SetHint(SDL_HINT_VIDEO_ALLOW_SCREENSAVER, "1");
|
||||
SDL_EnableScreenSaver();
|
||||
}
|
||||
|
||||
if (!params.center)
|
||||
SDL_SetWindowPosition(g_state.window, params.x, params.y);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user