comparison src/video/windib/SDL_dibvideo.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 8582c6a5ca16
children c75679dce60c
comparison
equal deleted inserted replaced
3980:5368d56af4da 3981:b0d021cf41b6
280 return handle; 280 return handle;
281 } 281 }
282 282
283 int DIB_VideoInit(_THIS, SDL_PixelFormat *vformat) 283 int DIB_VideoInit(_THIS, SDL_PixelFormat *vformat)
284 { 284 {
285 const char *env = NULL;
285 #ifndef NO_CHANGEDISPLAYSETTINGS 286 #ifndef NO_CHANGEDISPLAYSETTINGS
286 int i; 287 int i;
287 DEVMODE settings; 288 DEVMODE settings;
288 #endif 289 #endif
289 290
377 this->info.wm_available = 1; 378 this->info.wm_available = 1;
378 379
379 #ifdef _WIN32_WCE 380 #ifdef _WIN32_WCE
380 this->hidden->origRotation = -1; 381 this->hidden->origRotation = -1;
381 #endif 382 #endif
383
384 /* Allow environment override of screensaver disable. */
385 env = SDL_getenv("SDL_VIDEO_ALLOW_SCREENSAVER");
386 this->hidden->allow_screensaver = ( (env && SDL_atoi(env)) ? 1 : 0 );
382 387
383 /* We're done! */ 388 /* We're done! */
384 return(0); 389 return(0);
385 } 390 }
386 391