diff --git a/client/src/main.c b/client/src/main.c index c9824cd6..3205c0a3 100644 --- a/client/src/main.c +++ b/client/src/main.c @@ -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);