VOGONS


Moderate idle bug...

Topic actions

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 1 of 7, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Hm you should check out the SDL sources, especially in the last time there
were some additions to the screensaver handling, maybe that'd work.

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 3 of 7, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Well it needs some interfacing with sdl, it's not automatic.
I'll see about it if i can reproduce the problem.

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 5 of 7, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

But the only thing to do against this is disabling the screensaver, right?
Probably only in fullscreen mode or so.

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!