This is a bit of a hack: Before showing the mouse cursor, take care of any

pending events so that the it won't have to do a little dance, catching up,
every time you enter a room.

svn-id: r21316
This commit is contained in:
Torbjörn Andersson 2006-03-15 15:37:42 +00:00
parent 5d0ac7d57c
commit dc2143e6cf

View File

@ -1775,8 +1775,13 @@ void Screen::hideMouse() {
void Screen::showMouse() {
debugC( 9, kDebugLevelScreen, "Screen::showMouse()");
if (_mouseLockCount == 1)
if (_mouseLockCount == 1) {
// HACK: Flush the event queue before showing the mouse, so
// that the mouse cursor won't do a little dance catching
// up with the mouse movements when entering a new room.
_vm->delay(0);
_system->showMouse(true);
}
if (_mouseLockCount > 0)
_mouseLockCount--;