diff options
author | dhewg | 2011-02-24 22:32:32 +0100 |
---|---|---|
committer | dhewg | 2011-02-24 23:18:34 +0100 |
commit | a017cb3d00293c2f4c916c375fff172a6d962e33 (patch) | |
tree | 01ddb431bb6755b4de0fdf42f1f082a9a5048d60 /gui | |
parent | c8551b80dd917c35d367c1f15f4b9c2618da3684 (diff) | |
download | scummvm-rg350-a017cb3d00293c2f4c916c375fff172a6d962e33.tar.gz scummvm-rg350-a017cb3d00293c2f4c916c375fff172a6d962e33.tar.bz2 scummvm-rg350-a017cb3d00293c2f4c916c375fff172a6d962e33.zip |
GUI: Fix two-step rendering
This is used when changing directories in the 'add game' dialog or when
choosing another tab in the option dialog. Only blit to the overlay on
the final pass. Gets rid of highly annoying flickers on androids
Diffstat (limited to 'gui')
-rw-r--r-- | gui/ThemeEngine.cpp | 5 | ||||
-rw-r--r-- | gui/ThemeEngine.h | 2 | ||||
-rw-r--r-- | gui/gui-manager.cpp | 7 |
3 files changed, 8 insertions, 6 deletions
diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp index 356ed0ff90..235ea24fbe 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 e852760e44..2a3964a8ff 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 7644cbe7b2..3ad4b2ee18 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(); |