diff options
author | Einar Johan Trøan Sømåen | 2013-01-22 16:24:49 +0100 |
---|---|---|
committer | Einar Johan Trøan Sømåen | 2013-01-22 16:24:49 +0100 |
commit | 4ba603807a1ec8ba0b65aff102a8578b1b59fd95 (patch) | |
tree | d511d0c611c7842d80f006078411af75102da6d1 /engines/wintermute/base/gfx/osystem/base_render_osystem.cpp | |
parent | 6a972052ade7fa931f6db30d553f933927687532 (diff) | |
download | scummvm-rg350-4ba603807a1ec8ba0b65aff102a8578b1b59fd95.tar.gz scummvm-rg350-4ba603807a1ec8ba0b65aff102a8578b1b59fd95.tar.bz2 scummvm-rg350-4ba603807a1ec8ba0b65aff102a8578b1b59fd95.zip |
WINTERMUTE: Add a hack to skip a single frame after saving/loading. (Fix Bug: #3592874)
Diffstat (limited to 'engines/wintermute/base/gfx/osystem/base_render_osystem.cpp')
-rw-r--r-- | engines/wintermute/base/gfx/osystem/base_render_osystem.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp b/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp index 097ea7fa42..df88e3b499 100644 --- a/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp +++ b/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp @@ -53,6 +53,7 @@ BaseRenderOSystem::BaseRenderOSystem(BaseGame *inGame) : BaseRenderer(inGame) { _needsFlip = true; _spriteBatch = false; _batchNum = 0; + _skipThisFrame = false; _borderLeft = _borderRight = _borderTop = _borderBottom = 0; _ratioX = _ratioY = 1.0f; @@ -155,6 +156,14 @@ bool BaseRenderOSystem::indicatorFlip() { } bool BaseRenderOSystem::flip() { + if (_skipThisFrame) { + _skipThisFrame = false; + delete _dirtyRect; + _dirtyRect = NULL; + g_system->updateScreen(); + _needsFlip = false; + return true; + } if (!_disableDirtyRects) { drawTickets(); } else { @@ -583,6 +592,9 @@ void BaseRenderOSystem::endSaveLoad() { it = _renderQueue.erase(it); delete ticket; } + // HACK: After a save the buffer will be drawn before the scripts get to update it, + // so just skip this single frame. + _skipThisFrame = true; _drawNum = 1; } |