Commit 1930946b authored by Sam Lantinga's avatar Sam Lantinga

Fixed bug #510

Oops, we were disabling the screensaver before checking SDL_VIDEO_ALLOW_SCREENSAVER

--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402685
parent 46e4acae
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment