[AD] Screensavers & Monitor Power Down |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
Hi,
what about including some lines to the Windows code, which disable
screensaver / monitor power down? I've found this on the net.
Perhaps make it optional to block SS or MPD, because if your're playing a
game with joystick or pad, the screensave WILL pop up sometime.
LONG WINAPI WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch (uMsg)
{
// disable screen saver and monitor power down
// messages
case WM_SYSCOMMAND:
{
switch (wParam)
{
case SC_SCREENSAVE:
case SC_MONITORPOWER:
return 0;
break;
default:
break;
}
}
[other switch cases]
}
// default action
return DefWindowProc(hWnd, uMsg, wParam, lParam);
}
------------------------------
joerg@xxxxxxxxxx
home: http://www.sharky-x.de
music: http://mp3.sharky-x.de
-----------------(SHX '00)----