src/video/windib/SDL_dibevents.c
branchSDL-1.2
changeset 3981 b0d021cf41b6
parent 3868 b2f59aadec0d
child 4139 568c9b3c0167
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: {