aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gui/gui-manager.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/gui/gui-manager.cpp b/gui/gui-manager.cpp
index 3ad4b2ee18..0cb06458ef 100644
--- a/gui/gui-manager.cpp
+++ b/gui/gui-manager.cpp
@@ -294,7 +294,6 @@ void GuiManager::runLoop() {
Common::Event event;
while (eventMan->pollEvent(event)) {
-
// The top dialog can change during the event loop. In that case, flush all the
// dialog-related events since they were probably generated while the old dialog
// was still visible, and therefore not intended for the new one.
@@ -306,12 +305,6 @@ void GuiManager::runLoop() {
Common::Point mouse(event.mouse.x - activeDialog->_x, event.mouse.y - activeDialog->_y);
- if (lastRedraw + waitTime < _system->getMillis()) {
- _theme->updateScreen();
- _system->updateScreen();
- lastRedraw = _system->getMillis();
- }
-
switch (event.type) {
case Common::EVENT_KEYDOWN:
activeDialog->handleKeyDown(event.kbd);
@@ -366,6 +359,12 @@ void GuiManager::runLoop() {
default:
break;
}
+
+ if (lastRedraw + waitTime < _system->getMillis()) {
+ _theme->updateScreen();
+ _system->updateScreen();
+ lastRedraw = _system->getMillis();
+ }
}
if (tooltipCheck && _lastMousePosition.time + kTooltipDelay < _system->getMillis()) {