aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/graphics/frameout.cpp12
-rw-r--r--engines/sci/graphics/frameout.h6
2 files changed, 17 insertions, 1 deletions
diff --git a/engines/sci/graphics/frameout.cpp b/engines/sci/graphics/frameout.cpp
index 140c27a6d7..50f26474f1 100644
--- a/engines/sci/graphics/frameout.cpp
+++ b/engines/sci/graphics/frameout.cpp
@@ -76,6 +76,7 @@ GfxFrameout::GfxFrameout(SegManager *segMan, ResourceManager *resMan, GfxCoordAd
_benchmarkingFinished(false),
_throttleFrameOut(true),
_showStyles(nullptr),
+ _throttleState(0),
// TODO: Stop using _gfxScreen
_currentBuffer(screen->getDisplayWidth(), screen->getDisplayHeight(), nullptr),
_remapOccurred(false),
@@ -1567,7 +1568,16 @@ void GfxFrameout::kernelFrameOut(const bool shouldShowBits) {
}
if (_throttleFrameOut) {
- g_sci->getEngineState()->speedThrottler(16);
+ uint8 throttleTime;
+ if (_throttleState == 2) {
+ throttleTime = 17;
+ _throttleState = 0;
+ } else {
+ throttleTime = 16;
+ ++_throttleState;
+ }
+
+ g_sci->getEngineState()->speedThrottler(throttleTime);
g_sci->getEngineState()->_throttleTrigger = true;
}
}
diff --git a/engines/sci/graphics/frameout.h b/engines/sci/graphics/frameout.h
index 4a44410334..d349bbe66f 100644
--- a/engines/sci/graphics/frameout.h
+++ b/engines/sci/graphics/frameout.h
@@ -304,6 +304,12 @@ public:
#pragma mark Rendering
private:
/**
+ * State tracker to provide more accurate 60fps
+ * video throttling.
+ */
+ uint8 _throttleState;
+
+ /**
* TODO: Documentation
*/
int8 _styleRanges[256];