[Scummvm-git-logs] scummvm master -> b1901e9bd18e3c73e6a1ca37dbab9d2354e6c430
sev-
sev at scummvm.org
Wed Sep 21 00:19:12 CEST 2016
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
b1901e9bd1 FULLPIPE: Throttle animation playback to 30fps
Commit: b1901e9bd18e3c73e6a1ca37dbab9d2354e6c430
https://github.com/scummvm/scummvm/commit/b1901e9bd18e3c73e6a1ca37dbab9d2354e6c430
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-09-21T00:19:04+02:00
Commit Message:
FULLPIPE: Throttle animation playback to 30fps
Changed paths:
engines/fullpipe/fullpipe.cpp
diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp
index 6b8f92c..c2d4106 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();
}
More information about the Scummvm-git-logs
mailing list