src/events/SDL_events.c
changeset 7857 6388f5229bb7
parent 7719 31b5f9ff36ca
child 7860 2b0bcdea3a79
equal deleted inserted replaced
7856:cb37776926ad 7857:6388f5229bb7
   441         case 0:
   441         case 0:
   442             if (timeout == 0) {
   442             if (timeout == 0) {
   443                 /* Polling and no events, just return */
   443                 /* Polling and no events, just return */
   444                 return 0;
   444                 return 0;
   445             }
   445             }
   446             if (timeout > 0 && ((int) (SDL_GetTicks() - expiration) >= 0)) {
   446             if (timeout > 0 && SDL_TICKS_PASSED(SDL_GetTicks(), expiration)) {
   447                 /* Timeout expired and no events */
   447                 /* Timeout expired and no events */
   448                 return 0;
   448                 return 0;
   449             }
   449             }
   450             SDL_Delay(10);
   450             SDL_Delay(10);
   451             break;
   451             break;