From 31f73f207cc319583c3f57de4232e77c82b5a8a3 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sat, 29 Dec 2007 21:41:48 +0000 Subject: [PATCH] Fixed bug #510 Oops, we were disabling the screensaver before checking SDL_VIDEO_ALLOW_SCREENSAVER --- src/video/x11/SDL_x11video.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/video/x11/SDL_x11video.c b/src/video/x11/SDL_x11video.c index 99ff2aa2a..06858720e 100644 --- a/src/video/x11/SDL_x11video.c +++ b/src/video/x11/SDL_x11video.c @@ -667,6 +667,10 @@ static int X11_VideoInit(_THIS, SDL_PixelFormat *vformat) } X11_SaveVidModeGamma(this); + /* Allow environment override of screensaver disable. */ + env = SDL_getenv("SDL_VIDEO_ALLOW_SCREENSAVER"); + this->hidden->allow_screensaver = ( (env && SDL_atoi(env)) ? 1 : 0 ); + /* Save DPMS and screensaver settings */ X11_SaveScreenSaver(SDL_Display, &screensaver_timeout, &dpms_enabled); X11_DisableScreenSaver(this, SDL_Display); @@ -685,10 +689,6 @@ static int X11_VideoInit(_THIS, SDL_PixelFormat *vformat) /* Fill in some window manager capabilities */ this->info.wm_available = 1; - /* Allow environment override of screensaver disable. */ - env = SDL_getenv("SDL_VIDEO_ALLOW_SCREENSAVER"); - this->hidden->allow_screensaver = ( (env && SDL_atoi(env)) ? 1 : 0 ); - /* We're done! */ XFlush(SDL_Display); return(0);