Mercurial > sdl-ios-xcode
diff src/video/x11/SDL_x11video.c @ 1783:c546353b1ad4
Fixed bug #203
Disable screensaver and DPMS blanking while SDL app is running.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 08 May 2006 06:38:13 +0000 |
parents | ae9f6be81810 |
children | 45669d4efd02 |
line wrap: on
line diff
--- a/src/video/x11/SDL_x11video.c Mon May 08 06:23:11 2006 +0000 +++ b/src/video/x11/SDL_x11video.c Mon May 08 06:38:13 2006 +0000 @@ -544,6 +544,10 @@ } X11_SaveVidModeGamma(this); + /* Save DPMS and screensaver settings */ + X11_SaveScreenSaver(this); + X11_DisableScreenSaver(this); + /* See if we have been passed a window to use */ SDL_windowid = SDL_getenv("SDL_WINDOWID"); @@ -1364,11 +1368,15 @@ SDL_free(SDL_iconcolors); SDL_iconcolors = NULL; } + /* Restore gamma settings if they've changed */ if ( SDL_GetAppState() & SDL_APPACTIVE ) { X11_SwapVidModeGamma(this); } + /* Restore DPMS and screensaver settings */ + X11_RestoreScreenSaver(this); + /* Free that blank cursor */ if ( SDL_BlankCursor != NULL ) { this->FreeWMCursor(this, SDL_BlankCursor);