Просмотр исходного кода

Fixed lockup while waiting for events

Sam Lantinga 2 лет назад
Родитель
Сommit
d98bd67733
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/events/SDL_events.c

+ 1 - 1
src/events/SDL_events.c

@@ -1092,7 +1092,7 @@ int SDL_WaitEventTimeoutNS(SDL_Event *event, Sint64 timeoutNS)
         case -1:
             return 0;
         case 0:
-            if (timeoutNS > 0 && SDL_GetTicks() >= expiration) {
+            if (timeoutNS > 0 && SDL_GetTicksNS() >= expiration) {
                 /* Timeout expired and no events */
                 return 0;
             }