diff options
Diffstat (limited to 'engines/sci/graphics')
-rw-r--r-- | engines/sci/graphics/frameout.cpp | 5 | ||||
-rw-r--r-- | engines/sci/graphics/frameout.h | 5 | ||||
-rw-r--r-- | engines/sci/graphics/video32.cpp | 9 |
3 files changed, 18 insertions, 1 deletions
diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp index b49332dcb3..4e28f80817 100644 --- a/engines/sci/graphics/frameout.cpp +++ b/engines/sci/graphics/frameout.cpp @@ -69,6 +69,7 @@ GfxFrameout::GfxFrameout(SegManager *segMan, GfxPalette32 *palette, GfxTransitio _throttleState(0), _remapOccurred(false), _overdrawThreshold(0), + _throttleKernelFrameOut(true), _palMorphIsOn(false), _lastScreenUpdateTick(0) { @@ -1136,7 +1137,9 @@ void GfxFrameout::kernelFrameOut(const bool shouldShowBits) { frameOut(shouldShowBits); } - throttle(); + if (_throttleKernelFrameOut) { + throttle(); + } } void GfxFrameout::throttle() { diff --git a/engines/sci/graphics/frameout.h b/engines/sci/graphics/frameout.h index 93dc35e632..d94689be5b 100644 --- a/engines/sci/graphics/frameout.h +++ b/engines/sci/graphics/frameout.h @@ -310,6 +310,11 @@ public: } /** + * Whether or not to throttle kFrameOut calls. + */ + bool _throttleKernelFrameOut; + + /** * Whether palMorphFrameOut should be used instead of * frameOut for rendering. Used by kMorphOn to * explicitly enable palMorphFrameOut for one frame. diff --git a/engines/sci/graphics/video32.cpp b/engines/sci/graphics/video32.cpp index d92f9a1893..da34a734e8 100644 --- a/engines/sci/graphics/video32.cpp +++ b/engines/sci/graphics/video32.cpp @@ -890,6 +890,13 @@ void VMDPlayer::initComposited() { // here, but none of the game scripts seem to use this functionality. g_sci->_gfxFrameout->addScreenItem(*_screenItem); + + // Composited VMDs periodically yield to game scripts which will often call + // kFrameOut to make changes to other parts of the screen. Since VMDPlayer + // is responsible for throttling output during these times, GfxFrameout + // needs to stop throttling kFrameOut calls or else we will drop frames when + // kFrameOut sleeps right through the next frame + g_sci->_gfxFrameout->_throttleKernelFrameOut = false; } void VMDPlayer::renderComposited() const { @@ -915,6 +922,8 @@ void VMDPlayer::closeComposited() { // This call *actually* deletes the plane/screen item g_sci->_gfxFrameout->frameOut(true); } + + g_sci->_gfxFrameout->_throttleKernelFrameOut = true; } #pragma mark - |