diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/wintermute/base/gfx/osystem/base_render_osystem.cpp | 12 | ||||
-rw-r--r-- | engines/wintermute/base/gfx/osystem/base_render_osystem.h | 2 |
2 files changed, 14 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; } diff --git a/engines/wintermute/base/gfx/osystem/base_render_osystem.h b/engines/wintermute/base/gfx/osystem/base_render_osystem.h index e79a0cee46..9c36edb573 100644 --- a/engines/wintermute/base/gfx/osystem/base_render_osystem.h +++ b/engines/wintermute/base/gfx/osystem/base_render_osystem.h @@ -112,6 +112,8 @@ private: float _ratioY; uint32 _colorMod; uint32 _clearColor; + + bool _skipThisFrame; }; } // end of namespace Wintermute |