diff options
author | Colin Snover | 2016-07-02 19:11:59 -0500 |
---|---|---|
committer | Colin Snover | 2016-07-02 22:29:28 -0500 |
commit | 57a53420c366d327581cee72181bd6bed8d8e7c7 (patch) | |
tree | 2b6764e380c97c215837167a4f0a6244d1cb9e42 /engines/sci/graphics/frameout.h | |
parent | da48b1bbea94e8ae83b51125c998ff27a4358ddd (diff) | |
download | scummvm-rg350-57a53420c366d327581cee72181bd6bed8d8e7c7.tar.gz scummvm-rg350-57a53420c366d327581cee72181bd6bed8d8e7c7.tar.bz2 scummvm-rg350-57a53420c366d327581cee72181bd6bed8d8e7c7.zip |
SCI32: Expose graphics throttling code
Controls that manage their own event loops and call frameOut
directly generally need to sleep in order to avoid 100% CPU,
just like the main VM event loop.
Diffstat (limited to 'engines/sci/graphics/frameout.h')
-rw-r--r-- | engines/sci/graphics/frameout.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/engines/sci/graphics/frameout.h b/engines/sci/graphics/frameout.h index 05c48c3485..cc62c61d22 100644 --- a/engines/sci/graphics/frameout.h +++ b/engines/sci/graphics/frameout.h @@ -185,7 +185,7 @@ private: /** * Whether or not calls to kFrameOut should be framerate - * limited to ~60fps. + * limited to 60fps. */ bool _throttleFrameOut; @@ -438,6 +438,12 @@ public: void kernelFrameOut(const bool showBits); /** + * Throttles the engine as necessary to maintain + * 60fps output. + */ + void throttle(); + + /** * Updates the internal screen buffer for the next * frame. If `shouldShowBits` is true, also sends the * buffer to hardware. If `eraseRect` is non-empty, |