[Scummvm-cvs-logs] SF.net SVN: scummvm: [20639] residual/trunk/timer.cpp
marcus_c at users.sourceforge.net
marcus_c at users.sourceforge.net
Sun Feb 12 11:02:12 CET 2006
Revision: 20639
Author: marcus_c
Date: 2006-02-12 11:01:26 -0800 (Sun, 12 Feb 2006)
ViewCVS: http://svn.sourceforge.net/scummvm?rev=20639&view=rev
Log Message:
-----------
If the timer has been frozen for a long time, don't call the procedures a silly number of times, just resynchronize.
Modified Paths:
--------------
residual/trunk/timer.cpp
Modified: residual/trunk/timer.cpp
===================================================================
--- residual/trunk/timer.cpp 2006-02-12 18:58:54 UTC (rev 20638)
+++ residual/trunk/timer.cpp 2006-02-12 19:01:26 UTC (rev 20639)
@@ -73,6 +73,13 @@
_thisTime = g_driver->getMillis();
interval = 1000 * (_thisTime - _lastTime);
+ // If the timer has been frozen for a long time, don't
+ // call the procedures a silly number of times, just resynchronize
+ if(interval > 1000000) {
+ interval = 0;
+ warning("Timer skipped forward");
+ }
+
for (l = 0; l < MAX_TIMERS; l++) {
if (_timerSlots[l].procedure && _timerSlots[l].interval > 0) {
_timerSlots[l].counter -= interval;
More information about the Scummvm-git-logs
mailing list