projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ab31a3a
)
Fix timer problem when using Fortran bindings (submitted by Bill Mitchell)
author
Brian
<brian.paul@tungstengraphics.com>
Thu, 13 Sep 2007 20:42:23 +0000
(14:42 -0600)
committer
Brian
<brian.paul@tungstengraphics.com>
Thu, 13 Sep 2007 20:42:23 +0000
(14:42 -0600)
Also, add some comments about what's going on.
src/glut/glx/glut_event.c
patch
|
blob
|
history
diff --git
a/src/glut/glx/glut_event.c
b/src/glut/glx/glut_event.c
index 0a96e8cf71de932b5229a8051bd821c4aa511c0f..b5df7b23119d93c5f0416231d65e31dabe952aaf 100644
(file)
--- a/
src/glut/glx/glut_event.c
+++ b/
src/glut/glx/glut_event.c
@@
-172,10
+172,14
@@
handleTimeouts(void)
GETTIMEOFDAY(&now);
while (IS_AT_OR_AFTER(__glutTimerList->timeout, now)) {
timer = __glutTimerList;
- __glutTimerList = timer->next;
+ /* call the timer function */
timer->func(timer->value);
+ /* remove from the linked list */
+ __glutTimerList = timer->next;
+ /* put this timer on the "free" list */
timer->next = freeTimerList;
freeTimerList = timer;
+
if (!__glutTimerList)
break;
}