diff options
-rw-r--r-- | graphics/VectorRenderer.cpp | 4 | ||||
-rw-r--r-- | gui/ThemeRenderer.h | 5 | ||||
-rw-r--r-- | gui/newgui.cpp | 8 |
3 files changed, 8 insertions, 9 deletions
diff --git a/graphics/VectorRenderer.cpp b/graphics/VectorRenderer.cpp index 9b460e1ac0..639039fe28 100644 --- a/graphics/VectorRenderer.cpp +++ b/graphics/VectorRenderer.cpp @@ -440,8 +440,8 @@ drawRoundedSquare(int x, int y, int r, int w, int h) { w <= 0 || h <= 0 || x < 0 || y < 0) return; - while ((r << 1) > w || (r << 1) > h) - r <<= 1; + if ((r << 1) > w || (r << 1) > h) + r = MIN(w >> 1, h >> 1); if (Base::_fillMode != kFillDisabled && Base::_shadowOffset && x + w + Base::_shadowOffset < Base::_activeSurface->w diff --git a/gui/ThemeRenderer.h b/gui/ThemeRenderer.h index 134e6fba87..abaff44c55 100644 --- a/gui/ThemeRenderer.h +++ b/gui/ThemeRenderer.h @@ -223,10 +223,7 @@ public: /** Since the rendering pipeline changes, closing all dialogs causes no effect TODO: remove this from the original GUI::Theme API */ - void closeAllDialogs() { - memset(_backBuffer->pixels, 0, _backBuffer->w * _backBuffer->h * _backBuffer->bytesPerPixel); - - } + void closeAllDialogs() {} /** Drawing area has been removed: it was too hackish. A workaround is on the works. TODO: finish the workaround for the credits dialog diff --git a/gui/newgui.cpp b/gui/newgui.cpp index acbf14cae2..b9b4fa028f 100644 --- a/gui/newgui.cpp +++ b/gui/newgui.cpp @@ -195,15 +195,17 @@ void NewGui::redraw() { case kRedrawFull: case kRedrawTopDialog: _theme->clearAll(); - _theme->closeAllDialogs(); + _theme->openDialog(true); for (i = 0; i < _dialogStack.size() - 1; i++) { - _dialogStack[i]->drawDialog(); + _dialogStack[i]->drawDialog(); } + _theme->finishBuffering(); + _theme->updateScreen(); + case kRedrawOpenDialog: _theme->openDialog(true); - //_theme->startBuffering(); _dialogStack.top()->drawDialog(); _theme->finishBuffering(); break; |