mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-03 07:30:56 +00:00
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
This commit is contained in:
parent
c8551b80dd
commit
a017cb3d00
@ -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) {
|
||||
|
@ -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 */
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user