diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp index 356ed0ff904..235ea24fbe8 100644 --- a/gui/ThemeEngine.cpp +++ b/gui/ThemeEngine.cpp @@ -1192,7 +1192,7 @@ void ThemeEngine::debugWidgetPosition(const char *name, const Common::Rect &r) { /********************************************************** * Screen/overlay management *********************************************************/ -void ThemeEngine::updateScreen() { +void ThemeEngine::updateScreen(bool render) { if (!_bufferQueue.empty()) { _vectorRenderer->setSurface(&_backBuffer); @@ -1217,7 +1217,8 @@ void ThemeEngine::updateScreen() { _screenQueue.clear(); } - renderDirtyScreen(); + if (render) + renderDirtyScreen(); } void ThemeEngine::addDirtyRect(Common::Rect r) { diff --git a/gui/ThemeEngine.h b/gui/ThemeEngine.h index e852760e44e..2a3964a8ffc 100644 --- a/gui/ThemeEngine.h +++ b/gui/ThemeEngine.h @@ -280,7 +280,7 @@ public: * It processes all the drawing queues and then copies dirty rects * in the current Screen surface to the overlay. */ - void updateScreen(); + void updateScreen(bool render = true); /** @name FONT MANAGEMENT METHODS */ diff --git a/gui/gui-manager.cpp b/gui/gui-manager.cpp index 7644cbe7b27..3ad4b2ee18e 100644 --- a/gui/gui-manager.cpp +++ b/gui/gui-manager.cpp @@ -201,14 +201,15 @@ void GuiManager::redraw() { _theme->clearAll(); _theme->openDialog(true, ThemeEngine::kShadingNone); - for (i = 0; i < _dialogStack.size() - 1; i++) { + for (i = 0; i < _dialogStack.size() - 1; i++) _dialogStack[i]->drawDialog(); - } _theme->finishBuffering(); + // fall through + case kRedrawOpenDialog: - _theme->updateScreen(); + _theme->updateScreen(false); _theme->openDialog(true, shading); _dialogStack.top()->drawDialog(); _theme->finishBuffering();