Mercurial > sdl-ios-xcode
comparison src/video/x11/SDL_x11video.c @ 4124:df2f562890a0 SDL-1.2
Fixed bug #510
Oops, we were disabling the screensaver before checking SDL_VIDEO_ALLOW_SCREENSAVER
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sat, 29 Dec 2007 21:41:48 +0000 |
parents | 07d621a03a94 |
children | 568c9b3c0167 |
comparison
equal
deleted
inserted
replaced
4123:9d90d7765fa7 | 4124:df2f562890a0 |
---|---|
665 if ( this->hidden->depth == 32 ) { | 665 if ( this->hidden->depth == 32 ) { |
666 vformat->Amask = (0xFFFFFFFF & ~(vformat->Rmask|vformat->Gmask|vformat->Bmask)); | 666 vformat->Amask = (0xFFFFFFFF & ~(vformat->Rmask|vformat->Gmask|vformat->Bmask)); |
667 } | 667 } |
668 X11_SaveVidModeGamma(this); | 668 X11_SaveVidModeGamma(this); |
669 | 669 |
670 /* Allow environment override of screensaver disable. */ | |
671 env = SDL_getenv("SDL_VIDEO_ALLOW_SCREENSAVER"); | |
672 this->hidden->allow_screensaver = ( (env && SDL_atoi(env)) ? 1 : 0 ); | |
673 | |
670 /* Save DPMS and screensaver settings */ | 674 /* Save DPMS and screensaver settings */ |
671 X11_SaveScreenSaver(SDL_Display, &screensaver_timeout, &dpms_enabled); | 675 X11_SaveScreenSaver(SDL_Display, &screensaver_timeout, &dpms_enabled); |
672 X11_DisableScreenSaver(this, SDL_Display); | 676 X11_DisableScreenSaver(this, SDL_Display); |
673 | 677 |
674 /* See if we have been passed a window to use */ | 678 /* See if we have been passed a window to use */ |
682 BLANK_CWIDTH, BLANK_CHEIGHT, | 686 BLANK_CWIDTH, BLANK_CHEIGHT, |
683 BLANK_CHOTX, BLANK_CHOTY); | 687 BLANK_CHOTX, BLANK_CHOTY); |
684 | 688 |
685 /* Fill in some window manager capabilities */ | 689 /* Fill in some window manager capabilities */ |
686 this->info.wm_available = 1; | 690 this->info.wm_available = 1; |
687 | |
688 /* Allow environment override of screensaver disable. */ | |
689 env = SDL_getenv("SDL_VIDEO_ALLOW_SCREENSAVER"); | |
690 this->hidden->allow_screensaver = ( (env && SDL_atoi(env)) ? 1 : 0 ); | |
691 | 691 |
692 /* We're done! */ | 692 /* We're done! */ |
693 XFlush(SDL_Display); | 693 XFlush(SDL_Display); |
694 return(0); | 694 return(0); |
695 } | 695 } |