|
Screensaver when using gamepad |
count
Member #5,401
January 2005
|
I'm currently writing a game whith gamepad support. How can I prevent that the screensaver/power safe mode turns on, while my game is played with a gamepad. This dosn't happen on commercial games, does it? Thanks for your help!
|
DanielH
Member #934
January 2001
|
With Win32 look up on Microsoft WM_SYSCOMMAND //from 'allegro.c' getting value from 'allegro.cfg' _screensaver_policy = get_config_int(uconvert_ascii("system", tmp1), uconvert_ascii("disable_screensaver", tmp2), FULLSCREEN_DISABLED); // from 'wwnd.c' case WM_SYSCOMMAND: if (wparam == SC_MONITORPOWER || wparam == SC_SCREENSAVE) { if (_screensaver_policy == ALWAYS_DISABLED || (_screensaver_policy == FULLSCREEN_DISABLED && gfx_driver && !gfx_driver->windowed)) return 0; } break;
|
count
Member #5,401
January 2005
|
Thank you. Would be cool if you could explain a little bit more what this code is/does. Thanks alot!
|
|