aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics/frameout.h
diff options
context:
space:
mode:
authorColin Snover2016-06-14 17:43:57 -0500
committerColin Snover2016-06-14 20:58:53 -0500
commitb56266d28dad338243dd0982328fed7f48633e84 (patch)
tree9f9a9ee95b551fa58785e7fc087cf024e53caf7e /engines/sci/graphics/frameout.h
parent934e1860637186c98d4dd8434a260923748b8936 (diff)
downloadscummvm-rg350-b56266d28dad338243dd0982328fed7f48633e84.tar.gz
scummvm-rg350-b56266d28dad338243dd0982328fed7f48633e84.tar.bz2
scummvm-rg350-b56266d28dad338243dd0982328fed7f48633e84.zip
SCI32: Fix video performance benchmarking in most SCI32 games
Most SCI32 games draw a "fred" object to the screen when the game first starts to benchmark video performance. When framerate throttling is enabled (which fixes many/most timing-related bugs and reduces system load caused by unnecessary graphics updates), the game's performance check will think that video card is slow, causing some "high-performance" game features to be disabled. To avoid this, we simply disable throttling during benchmarking by detecting the "fred" object.
Diffstat (limited to 'engines/sci/graphics/frameout.h')
-rw-r--r--engines/sci/graphics/frameout.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/engines/sci/graphics/frameout.h b/engines/sci/graphics/frameout.h
index 8ed95a00de..0f06ee1c85 100644
--- a/engines/sci/graphics/frameout.h
+++ b/engines/sci/graphics/frameout.h
@@ -179,6 +179,22 @@ public:
void run();
#pragma mark -
+#pragma mark Benchmarking
+private:
+ /**
+ * Optimization to avoid the more expensive object name
+ * comparision on every call to kAddScreenItem and
+ * kRemoveScreenItem.
+ */
+ bool _benchmarkingFinished;
+
+ /**
+ * Whether or not calls to kFrameOut should be framerate
+ * limited to ~60fps.
+ */
+ bool _throttleFrameOut;
+
+#pragma mark -
#pragma mark Screen items
private:
void deleteScreenItem(ScreenItem *screenItem, const reg_t plane);