diff options
author | Willem Jan Palenstijn | 2013-10-03 22:00:21 +0200 |
---|---|---|
committer | Willem Jan Palenstijn | 2013-10-03 22:00:21 +0200 |
commit | 25bff46fe6672f79ec81ede2e87cabf1156e84cd (patch) | |
tree | 0979780a25f3589742a2377f692dccd99cdda8f1 | |
parent | 3384befff7d2deb8a1aafeeb95e5201b4e19cc86 (diff) | |
download | scummvm-rg350-25bff46fe6672f79ec81ede2e87cabf1156e84cd.tar.gz scummvm-rg350-25bff46fe6672f79ec81ede2e87cabf1156e84cd.tar.bz2 scummvm-rg350-25bff46fe6672f79ec81ede2e87cabf1156e84cd.zip |
WINTERMUTE: Update full screen on ScreenChanged
This fixes the screen not updating after e.g., scaler changes.
Bug #3594245.
-rw-r--r-- | engines/wintermute/base/gfx/osystem/base_render_osystem.cpp | 11 | ||||
-rw-r--r-- | engines/wintermute/base/gfx/osystem/base_render_osystem.h | 1 |
2 files changed, 10 insertions, 2 deletions
diff --git a/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp b/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp index b53aef802d..f6ace34ce4 100644 --- a/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp +++ b/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp @@ -62,6 +62,8 @@ BaseRenderOSystem::BaseRenderOSystem(BaseGame *inGame) : BaseRenderer(inGame) { if (ConfMan.hasKey("dirty_rects")) { _disableDirtyRects = !ConfMan.getBool("dirty_rects"); } + + _lastScreenChangeID = g_system->getScreenChangeID(); } ////////////////////////////////////////////////////////////////////////// @@ -183,8 +185,13 @@ bool BaseRenderOSystem::flip() { } } } - if (_needsFlip || _disableDirtyRects) { - if (_disableDirtyRects) { + + int oldScreenChangeID = _lastScreenChangeID; + _lastScreenChangeID = g_system->getScreenChangeID(); + bool screenChanged = _lastScreenChangeID != oldScreenChangeID; + + if (_needsFlip || _disableDirtyRects || screenChanged) { + if (_disableDirtyRects || screenChanged) { g_system->copyRectToScreen((byte *)_renderSurface->getPixels(), _renderSurface->pitch, 0, 0, _renderSurface->w, _renderSurface->h); } // g_system->copyRectToScreen((byte *)_renderSurface->getPixels(), _renderSurface->pitch, _dirtyRect->left, _dirtyRect->top, _dirtyRect->width(), _dirtyRect->height()); diff --git a/engines/wintermute/base/gfx/osystem/base_render_osystem.h b/engines/wintermute/base/gfx/osystem/base_render_osystem.h index fa0b2afc40..8996c8b2e8 100644 --- a/engines/wintermute/base/gfx/osystem/base_render_osystem.h +++ b/engines/wintermute/base/gfx/osystem/base_render_osystem.h @@ -146,6 +146,7 @@ private: uint32 _clearColor; bool _skipThisFrame; + int _lastScreenChangeID; // previous value of OSystem::getScreenChangeID() }; } // End of namespace Wintermute |