src/video/windib/SDL_dibvideo.c
branchSDL-1.2
changeset 3981 b0d021cf41b6
parent 3976 8582c6a5ca16
child 3992 c75679dce60c
     1.1 --- a/src/video/windib/SDL_dibvideo.c	Tue Jun 26 00:57:09 2007 +0000
     1.2 +++ b/src/video/windib/SDL_dibvideo.c	Tue Jun 26 20:02:40 2007 +0000
     1.3 @@ -282,6 +282,7 @@
     1.4  
     1.5  int DIB_VideoInit(_THIS, SDL_PixelFormat *vformat)
     1.6  {
     1.7 +	const char *env = NULL;
     1.8  #ifndef NO_CHANGEDISPLAYSETTINGS
     1.9  	int i;
    1.10  	DEVMODE settings;
    1.11 @@ -380,6 +381,10 @@
    1.12  	this->hidden->origRotation = -1;
    1.13  #endif
    1.14  
    1.15 +	/* Allow environment override of screensaver disable. */
    1.16 +	env = SDL_getenv("SDL_VIDEO_ALLOW_SCREENSAVER");
    1.17 +	this->hidden->allow_screensaver = ( (env && SDL_atoi(env)) ? 1 : 0 );
    1.18 +
    1.19  	/* We're done! */
    1.20  	return(0);
    1.21  }