VOGONS


First post, by Sephiroth

User metadata
Rank Member
Rank
Member

I've discovered a rather annoying problem in DOSBox 0.72, and it may have been in prior versions as well. Apparently, DOSBox doesn't handle the "SC_SCREENSAVE" and/or "SC_MONITORPOWER" messages. What this means is that if you pause a game and step away for a few minutes, the screensaver will pop up, the game goes into some windowed state that isn't really windowed, and you have to alt+enter a few times to get it back to normal. This is fine, but it screws up the mouse sensitivity in games, making it twice as sensitive and rendering games like Shadow Warrior unplayable.

I use the following code in my OpenGL engine to deal with these annoyances.

case WM_SYSCOMMAND:
{
switch (wParam)
{
case SC_SCREENSAVE:
case SC_MONITORPOWER:
return 0;
}
break;
}

Simple C code, but this annoyed the heck out of me when I started OpenGL programming years back!

486 Launcher v2.0 is now under development!

Reply 2 of 7, by Sephiroth

User metadata
Rank Member
Rank
Member

That's alright, I am waiting for your next release. I simply wanted this bug to be noted before it was released so that a fix might make its way into that release.

486 Launcher v2.0 is now under development!

Reply 4 of 7, by Sephiroth

User metadata
Rank Member
Rank
Member

That's easy to do. Set your screensaver to 1min, fire up any game you want, and sit back to watch the demos. After about a minute, it'll happen. I only noticed the mouse sensitivity changing today while playing Shadow Warrior with a friend. After the screensaver kicked in and we got back to playing, both of us had ultra-sensitive mice!

486 Launcher v2.0 is now under development!

Reply 6 of 7, by Sephiroth

User metadata
Rank Member
Rank
Member

The code snippet I gave you does this. It returns nothing instead of allowing Windows to process the message. Just catch those two messages and return zero and you're set.

486 Launcher v2.0 is now under development!

Reply 7 of 7, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

http://www.libsdl.org/faq.php?action=listentries&category=9
Sounds like it's disabled by default though, yet as already noted there were
some changes to this handling in the last time.