[Scummvm-cvs-logs] scummvm master -> 9640048ad6e65c209251f68153dbc1560ee65676
dhewg
dhewg at wiibrew.org
Tue Apr 5 12:46:12 CEST 2011
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
9640048ad6 GUI: Update the screen after handling events
Commit: 9640048ad6e65c209251f68153dbc1560ee65676
https://github.com/scummvm/scummvm/commit/9640048ad6e65c209251f68153dbc1560ee65676
Author: dhewg (dhewg at wiibrew.org)
Date: 2011-04-05T03:44:46-07:00
Commit Message:
GUI: Update the screen after handling events
Fixes crash on droid:
game -> gmm -> save -> click entry (EVENT_SCREEN_CHANGED due to vkeybd
beeing shown) -> delete -> confirm
another EVENT_SCREEN_CHANGED gets in simultaneously (due vkeybd being
deactivated) and the parent dialog updated Rects out of bounds.
Changed paths:
gui/gui-manager.cpp
diff --git a/gui/gui-manager.cpp b/gui/gui-manager.cpp
index 3ad4b2e..0cb0645 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()) {
More information about the Scummvm-git-logs
mailing list