mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-22 12:12:16 +00:00
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.
This commit is contained in:
parent
b4051db142
commit
9640048ad6
@ -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()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user