From 4673e94c6fb93441ab5ebe9c3cb7d567cc9f7738 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 19 Aug 2009 16:48:55 +0000 Subject: - Fix sluggish mouse movement in Kyra2/Kyra3/LoL main menu. - Fix sluggish mouse movement in the text input dialog of the GUI. svn-id: r43541 --- engines/kyra/gui.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/engines/kyra/gui.cpp b/engines/kyra/gui.cpp index cc1add9ce7..e49085103a 100644 --- a/engines/kyra/gui.cpp +++ b/engines/kyra/gui.cpp @@ -232,10 +232,11 @@ void GUI::processHighlights(Menu &menu) { menu.highlightedItem = i; redrawHighlight(menu); - _screen->updateScreen(); } } } + + _screen->updateScreen(); } void GUI::redrawText(const Menu &menu) { @@ -424,7 +425,8 @@ void GUI::checkTextfieldInput() { Common::Point pos = _vm->getMousePos(); _vm->_mouseX = pos.x; _vm->_mouseY = pos.y; - _screen->updateScreen(); + + _vm->_system->updateScreen(); _lastScreenUpdate = now; } break; @@ -490,14 +492,24 @@ bool MainMenu::getInput() { Common::Event event; Common::EventManager *eventMan = _vm->getEventManager(); + bool updateScreen = false; + while (eventMan->pollEvent(event)) { switch (event.type) { case Common::EVENT_LBUTTONUP: return true; + + case Common::EVENT_MOUSEMOVE: + updateScreen = true; + break; + default: break; } } + + if (updateScreen) + _system->updateScreen(); return false; } -- cgit v1.2.3