aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2016-09-21 00:14:53 +0200
committerEugene Sandulenko2016-09-21 00:19:04 +0200
commitb1901e9bd18e3c73e6a1ca37dbab9d2354e6c430 (patch)
tree8e9d023a45cdeb3cc61c54c065138d8fb8f4e9f8
parent0ee75674fcfc545d2f0fb55cebe909cee506ea8e (diff)
downloadscummvm-rg350-b1901e9bd18e3c73e6a1ca37dbab9d2354e6c430.tar.gz
scummvm-rg350-b1901e9bd18e3c73e6a1ca37dbab9d2354e6c430.tar.bz2
scummvm-rg350-b1901e9bd18e3c73e6a1ca37dbab9d2354e6c430.zip
FULLPIPE: Throttle animation playback to 30fps
-rw-r--r--engines/fullpipe/fullpipe.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp
index 6b8f92ccd2..c2d4106d3f 100644
--- a/engines/fullpipe/fullpipe.cpp
+++ b/engines/fullpipe/fullpipe.cpp
@@ -284,10 +284,18 @@ Common::Error FullpipeEngine::run() {
_gameContinue = true;
+ int time1 = g_fp->_system->getMillis();
+
while (_gameContinue) {
updateEvents();
- updateScreen();
+ int time2 = g_fp->_system->getMillis();
+
+ // 30fps
+ if (time2 - time1 >= 33 || !_normalSpeed) {
+ time1 = time2;
+ updateScreen();
+ }
if (_needRestart) {
if (_modalObject) {
@@ -303,8 +311,7 @@ Common::Error FullpipeEngine::run() {
_needRestart = false;
}
- if (_normalSpeed)
- _system->delayMillis(10);
+ _system->delayMillis(5);
_system->updateScreen();
}