Re: [AD] install_param_int_ex() doesn't work :(

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On 11 Nov 2001, bnd25@xxxxxxxxxx <bnd25@xxxxxxxxxx> wrote:
> so I checked src/win/wtimer.c. Sure enough, support for param_procs simply 
> hadn't been added. He should be committing it soon.

Done.  Here are the changes:

Index: wtimer.c
===================================================================
RCS file: /cvsroot/alleg/allegro/src/win/wtimer.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- wtimer.c	2001/11/06 17:16:41	1.9
+++ wtimer.c	2001/11/11 02:44:07	1.10
@@ -144,12 +144,15 @@
 
    /* process the user callbacks */
    for (i = 0; i < MAX_TIMERS; i++) {
-      if ((_timer_queue[i].proc) && (_timer_queue[i].speed > 0)) {
+      if (((_timer_queue[i].proc) || (_timer_queue[i].param_proc)) && (_timer_queue[i].speed > 0)) {
 	 _timer_queue[i].counter -= d;
 
-	 while ((_timer_queue[i].counter <= 0) && (_timer_queue[i].proc) && (_timer_queue[i].speed > 0)) {
+	 while ((_timer_queue[i].counter <= 0) && ((_timer_queue[i].proc) || (_timer_queue[i].param_proc)) && (_timer_queue[i].speed > 0)) {
 	    _timer_queue[i].counter += _timer_queue[i].speed;
-	    _timer_queue[i].proc();
+	    if (_timer_queue[i].param_proc)
+	       _timer_queue[i].param_proc(_timer_queue[i].param);
+	    else
+	       _timer_queue[i].proc();
 	 }
 
 	 if ((_timer_queue[i].counter > 0) && (_timer_queue[i].counter < new_delay))



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/