Disable PowerManagement Option

Post Reply
shinra358
Junior Member
Posts: 9
Joined: Fri Sep 02, 2011 1:07 pm

Disable PowerManagement Option

Post by shinra358 »

I would like to suggest an option to keep screensaver/screen timeout/sleep mode from coming on like Zsnesw, Epsxe, Mame, etc.

Â

P.S. Forgive me if I've asked this before here, it's hard for me to keep track with all the emus out there.

Squall Leonhart
Posting Freak
Posts: 1219
Joined: Tue Mar 18, 2008 9:21 am

Disable PowerManagement Option

Post by Squall Leonhart »

The emulator already prevents the screensaver from coming on.

Â

Code: Select all

LRESULT MainWnd::OnMySysCommand(WPARAM wParam, LPARAM lParam)
{
 if(emulating && !theApp.paused) {
   if((wParam&0xFFF0) == SC_SCREENSAVE || (wParam&0xFFF0) == SC_MONITORPOWER)
     return 0;
 }
 return Default();
}

Â

However, Most applications that prevent the screensaver from coming up trip up on a change microsoft introduced in Windows XP SP3 that has carried over to Vista and 7, that is; "on resume, display logon/welcome screen" is checked, the Screensaver will run regardless of the applications capability for preventing the screen saver.

Â

"Microsoft Windows Vista and later: If password protection is enabled by policy, the screen saver is started regardless of what an application does with the SC_SCREENSAVE notification—even if fails to pass it to DefWindowProc."

Last edited by Squall Leonhart on Sun May 27, 2012 2:14 pm, edited 1 time in total.
Post Reply