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