[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
The Windows timer driver has used its own code in the 4.0.x series to handle
the ticks, a big part of which was merely duplicated from src/timer.c; as
this situation is bug-prone (Ben Davis fixed a discrepancy between the codes
some months ago), I made the Windows timer driver reuse the code in
src/timer.c for the 4.1.x series.
In the process I lifted a limitation on the accuracy of timers for the
Windows port. This modification has just bitten me back:
http://sourceforge.net/tracker/index.php?func=detail&aid=606246&group_id=5665&atid=105665
The fix is simply to re-enable the limitation:
--- /home/Eric/cvsroot/allegro/src/timer.c Wed May 15 08:39:02 2002
+++ allegro/src/timer.c Thu Sep 12 14:28:40 2002
@@ -102,6 +102,12 @@
timer_delay -= d;
timer_semaphore = FALSE;
+#ifdef ALLEGRO_WINDOWS
+ /* fudge factor to prevent interrupts from coming too close to each other */
+ if (new_delay < MSEC_TO_TIMER(1))
+ new_delay = MSEC_TO_TIMER(1);
+#endif
+
return new_delay;
}
Should we enable the limitation for the Windows port only or on a
platform-independent basis ?
- Eric