aboutsummaryrefslogtreecommitdiff
path: root/gui/gui-manager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gui/gui-manager.cpp')
-rw-r--r--gui/gui-manager.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/gui/gui-manager.cpp b/gui/gui-manager.cpp
index 2e947c6f32..4b91019372 100644
--- a/gui/gui-manager.cpp
+++ b/gui/gui-manager.cpp
@@ -208,7 +208,7 @@ bool GuiManager::loadNewTheme(Common::String id, ThemeEngine::GraphicsMode gfx,
void GuiManager::redraw() {
ThemeEngine::ShadingStyle shading;
- if (_redrawStatus == kRedrawDisabled || _dialogStack.empty())
+ if (_dialogStack.empty())
return;
shading = (ThemeEngine::ShadingStyle)xmlEval()->getVar("Dialog." + _dialogStack.top()->_name + ".Shading", 0);
@@ -241,9 +241,12 @@ void GuiManager::redraw() {
break;
default:
- return;
+ break;
}
+ // Redraw the widgets that are marked as dirty
+ _dialogStack.top()->drawWidgets();
+
_theme->updateScreen();
_redrawStatus = kRedrawDisabled;
}
@@ -304,8 +307,6 @@ void GuiManager::runLoop() {
while (!_dialogStack.empty() && activeDialog == getTopDialog() && !eventMan->shouldQuit()) {
uint32 frameStartTime = _system->getMillis(true);
- redraw();
-
// Don't "tickle" the dialog until the theme has had a chance
// to re-allocate buffers in case of a scaler change.
@@ -365,7 +366,7 @@ void GuiManager::runLoop() {
}
}
- _theme->updateScreen();
+ redraw();
// Delay until the allocated frame time is elapsed to match the target frame rate
uint32 actualFrameDuration = _system->getMillis(true) - frameStartTime;