src/thread/pthread/SDL_syssem.c
changeset 7732 4c0e4274c3f8
parent 7722 ea5565d856a8
child 7857 6388f5229bb7
--- a/src/thread/pthread/SDL_syssem.c	Thu Sep 05 15:49:57 2013 -0700
+++ b/src/thread/pthread/SDL_syssem.c	Fri Sep 06 20:45:08 2013 -0700
@@ -156,10 +156,10 @@
 #else
     end = SDL_GetTicks() + timeout;
     while ((retval = SDL_SemTryWait(sem)) == SDL_MUTEX_TIMEDOUT) {
-        if (SDL_GetTicks() >= end) {
+        if ((Sint32)(SDL_GetTicks() - end) >= 0) {
             break;
         }
-        SDL_Delay(0);
+        SDL_Delay(1);
     }
 #endif /* HAVE_SEM_TIMEDWAIT */