comparison src/video/x11/SDL_x11video.c @ 1783:c546353b1ad4

Fixed bug #203 Disable screensaver and DPMS blanking while SDL app is running.
author Sam Lantinga <slouken@libsdl.org>
date Mon, 08 May 2006 06:38:13 +0000
parents ae9f6be81810
children 45669d4efd02
comparison
equal deleted inserted replaced
1782:23fe15f88c03 1783:c546353b1ad4
542 if ( this->hidden->depth == 32 ) { 542 if ( this->hidden->depth == 32 ) {
543 vformat->Amask = (0xFFFFFFFF & ~(vformat->Rmask|vformat->Gmask|vformat->Bmask)); 543 vformat->Amask = (0xFFFFFFFF & ~(vformat->Rmask|vformat->Gmask|vformat->Bmask));
544 } 544 }
545 X11_SaveVidModeGamma(this); 545 X11_SaveVidModeGamma(this);
546 546
547 /* Save DPMS and screensaver settings */
548 X11_SaveScreenSaver(this);
549 X11_DisableScreenSaver(this);
550
547 /* See if we have been passed a window to use */ 551 /* See if we have been passed a window to use */
548 SDL_windowid = SDL_getenv("SDL_WINDOWID"); 552 SDL_windowid = SDL_getenv("SDL_WINDOWID");
549 553
550 /* Create the fullscreen and managed windows */ 554 /* Create the fullscreen and managed windows */
551 create_aux_windows(this); 555 create_aux_windows(this);
1362 } 1366 }
1363 } 1367 }
1364 SDL_free(SDL_iconcolors); 1368 SDL_free(SDL_iconcolors);
1365 SDL_iconcolors = NULL; 1369 SDL_iconcolors = NULL;
1366 } 1370 }
1371
1367 /* Restore gamma settings if they've changed */ 1372 /* Restore gamma settings if they've changed */
1368 if ( SDL_GetAppState() & SDL_APPACTIVE ) { 1373 if ( SDL_GetAppState() & SDL_APPACTIVE ) {
1369 X11_SwapVidModeGamma(this); 1374 X11_SwapVidModeGamma(this);
1370 } 1375 }
1376
1377 /* Restore DPMS and screensaver settings */
1378 X11_RestoreScreenSaver(this);
1371 1379
1372 /* Free that blank cursor */ 1380 /* Free that blank cursor */
1373 if ( SDL_BlankCursor != NULL ) { 1381 if ( SDL_BlankCursor != NULL ) {
1374 this->FreeWMCursor(this, SDL_BlankCursor); 1382 this->FreeWMCursor(this, SDL_BlankCursor);
1375 SDL_BlankCursor = NULL; 1383 SDL_BlankCursor = NULL;