Re: [AD] [ alleg-Bugs-1061019 ] rest function seems not to work on OSX

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


Attached is a patch which should fix it, according to the reporter of
the bug.

Index: src/unix/utimer.c
===================================================================
RCS file: /cvsroot/alleg/allegro/src/unix/utimer.c,v
retrieving revision 1.5
diff -u -p -r1.5 utimer.c
--- src/unix/utimer.c	29 Jul 2004 08:27:35 -0000	1.5
+++ src/unix/utimer.c	28 Nov 2004 16:58:43 -0000
@@ -50,9 +50,13 @@ void _unix_rest(unsigned int ms, void (*
       }
    }
    else {
+#ifdef ALLEGRO_MACOSX
+      usleep(ms * 1000);
+#else
       struct timeval timeout;
       timeout.tv_sec = 0;
       timeout.tv_usec = ms * 1000;
       select(0, NULL, NULL, NULL, &timeout);
+#endif
    }
 }


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