aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Snover2017-07-22 23:26:39 -0500
committerColin Snover2017-07-23 10:35:13 -0500
commit8d32353394ce4aa750e54becc3f2d2e375b3963d (patch)
tree8182ae174fe6cf6e8e535c839e4c8246af2dda16
parent2004aecb0583cec6bad8f903199cf1ffaf728a30 (diff)
downloadscummvm-rg350-8d32353394ce4aa750e54becc3f2d2e375b3963d.tar.gz
scummvm-rg350-8d32353394ce4aa750e54becc3f2d2e375b3963d.tar.bz2
scummvm-rg350-8d32353394ce4aa750e54becc3f2d2e375b3963d.zip
SCI32: Stop throttling of kFrameOut during interactive VMD playback
Refs Trac#9974, Trac#9975.
-rw-r--r--engines/sci/graphics/frameout.cpp5
-rw-r--r--engines/sci/graphics/frameout.h5
-rw-r--r--engines/sci/graphics/video32.cpp9
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 -