Mercurial > sdl-ios-xcode
diff src/video/windib/SDL_dibvideo.c @ 3981:b0d021cf41b6 SDL-1.2
windib target can now control screensaver with SDL_VIDEO_ALLOW_SCREENSAVER.
Fixes Bugzilla #415.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Tue, 26 Jun 2007 20:02:40 +0000 |
parents | 8582c6a5ca16 |
children | c75679dce60c |
line wrap: on
line diff
--- a/src/video/windib/SDL_dibvideo.c Tue Jun 26 00:57:09 2007 +0000 +++ b/src/video/windib/SDL_dibvideo.c Tue Jun 26 20:02:40 2007 +0000 @@ -282,6 +282,7 @@ int DIB_VideoInit(_THIS, SDL_PixelFormat *vformat) { + const char *env = NULL; #ifndef NO_CHANGEDISPLAYSETTINGS int i; DEVMODE settings; @@ -380,6 +381,10 @@ this->hidden->origRotation = -1; #endif + /* 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! */ return(0); }