From dc2143e6cf4ebd0e7f029201b89b8a5a46b0edf7 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Wed, 15 Mar 2006 15:37:42 +0000 Subject: 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 --- engines/kyra/screen.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'engines') diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp index b4c9cd2ce0..bc19717d1d 100644 --- a/engines/kyra/screen.cpp +++ b/engines/kyra/screen.cpp @@ -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--; -- cgit v1.2.3