Mercurial > sdl-ios-xcode
diff src/video/windib/SDL_dibevents.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 | b2f59aadec0d |
children | 568c9b3c0167 |
line wrap: on
line diff
--- a/src/video/windib/SDL_dibevents.c Tue Jun 26 00:57:09 2007 +0000 +++ b/src/video/windib/SDL_dibevents.c Tue Jun 26 20:02:40 2007 +0000 @@ -225,9 +225,14 @@ #if defined(SC_SCREENSAVE) && defined(SC_MONITORPOWER) case WM_SYSCOMMAND: { - if ((wParam&0xFFF0)==SC_SCREENSAVE || - (wParam&0xFFF0)==SC_MONITORPOWER) + const DWORD val = (DWORD) (wParam & 0xFFF0); + if ((val == SC_SCREENSAVE) || (val == SC_MONITORPOWER)) { + if (!this->hidden->allow_screensaver) { + /* Note that this doesn't stop anything on Vista + if the screensaver has a password. */ return(0); + } + } } /* Fall through to default processing */ #endif /* SC_SCREENSAVE && SC_MONITORPOWER */