comparison 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
comparison
equal deleted inserted replaced
3980:5368d56af4da 3981:b0d021cf41b6
223 } 223 }
224 return(0); 224 return(0);
225 225
226 #if defined(SC_SCREENSAVE) && defined(SC_MONITORPOWER) 226 #if defined(SC_SCREENSAVE) && defined(SC_MONITORPOWER)
227 case WM_SYSCOMMAND: { 227 case WM_SYSCOMMAND: {
228 if ((wParam&0xFFF0)==SC_SCREENSAVE || 228 const DWORD val = (DWORD) (wParam & 0xFFF0);
229 (wParam&0xFFF0)==SC_MONITORPOWER) 229 if ((val == SC_SCREENSAVE) || (val == SC_MONITORPOWER)) {
230 if (!this->hidden->allow_screensaver) {
231 /* Note that this doesn't stop anything on Vista
232 if the screensaver has a password. */
230 return(0); 233 return(0);
234 }
235 }
231 } 236 }
232 /* Fall through to default processing */ 237 /* Fall through to default processing */
233 #endif /* SC_SCREENSAVE && SC_MONITORPOWER */ 238 #endif /* SC_SCREENSAVE && SC_MONITORPOWER */
234 239
235 default: { 240 default: {