mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-03 07:30:56 +00:00
GUI: Clear dirty rects when initializing ThemeEngine.
This avoids nasty invalid writes to the overlay when the overlay is being resized.
This commit is contained in:
parent
d58efe3818
commit
74a056e746
@ -521,6 +521,12 @@ void ThemeEngine::setGraphicsMode(GraphicsMode mode) {
|
||||
delete _vectorRenderer;
|
||||
_vectorRenderer = Graphics::createRenderer(mode);
|
||||
_vectorRenderer->setSurface(&_screen);
|
||||
|
||||
// Since we reinitialized our screen surfaces we know nothing has been
|
||||
// drawn so far. Sometimes we still end up with dirty screen bits in the
|
||||
// list. Clearing it avoids invalid overlay writes when the backend
|
||||
// resizes the overlay.
|
||||
_dirtyScreen.clear();
|
||||
}
|
||||
|
||||
void WidgetDrawData::calcBackgroundOffset() {
|
||||
|
Loading…
Reference in New Issue
Block a user