Author: lewing
Date: 2008-01-22 14:18:23 -0500 (Tue, 22 Jan 2008)
New Revision: 93564
Modified:
trunk/moon/src/ChangeLog
trunk/moon/src/clock.cpp
Log:
2008-01-22 Larry Ewing <[EMAIL PROTECTED]>
* clock.cpp: initalize the smoothing to max framerate, the first
frame is quite likely the slowest frame we'll ever draw. Bump
error delta back up to 1/50th.
Modified: trunk/moon/src/ChangeLog
===================================================================
--- trunk/moon/src/ChangeLog 2008-01-22 19:03:21 UTC (rev 93563)
+++ trunk/moon/src/ChangeLog 2008-01-22 19:18:23 UTC (rev 93564)
@@ -1,3 +1,9 @@
+2008-01-22 Larry Ewing <[EMAIL PROTECTED]>
+
+ * clock.cpp: initalize the smoothing to max framerate, the first
+ frame is quite likely the slowest frame we'll ever draw. Bump
+ error delta back up to 1/50th.
+
2008-01-22 Chris Toshok <[EMAIL PROTECTED]>
* media.cpp (MediaElement::Render): a little cairo cleanup, and
Modified: trunk/moon/src/clock.cpp
===================================================================
--- trunk/moon/src/clock.cpp 2008-01-22 19:03:21 UTC (rev 93563)
+++ trunk/moon/src/clock.cpp 2008-01-22 19:18:23 UTC (rev 93564)
@@ -386,13 +386,14 @@
*/
#if USE_SMOOTHING
#define SMOOTHING_ALPHA 0.03 /* we probably want to play with this value
some.. - toshok */
+#define TIMEOUT_ERROR_DELTA 20 /* how far off of the current_timeout can we be
*/
TimeSpan xt = post_tick - pre_tick;
/* the s(0) case */
if (first_tick) {
first_tick = false;
- previous_smoothed = xt;
+ previous_smoothed = FPS_TO_DELAY (max_fps);
return;
}
@@ -410,7 +411,7 @@
// printf ("new timeout is %dms (%.2ffps)\n", current_timeout,
DELAY_TO_FPS (current_timeout));
- if (ABS(suggested_timeout - current_timeout) > 10) {
+ if (ABS(suggested_timeout - current_timeout) > TIMEOUT_ERROR_DELTA) {
source->SetTimerFrequency (suggested_timeout);
current_timeout = suggested_timeout;
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches