src/events/SDL_events.c
changeset 8535 e8ee0708ef5c
parent 8477 ad08f0d710f3
parent 7860 2b0bcdea3a79
child 8583 fb2933ca805f
     1.1 --- a/src/events/SDL_events.c	Sun Oct 27 14:31:57 2013 -0400
     1.2 +++ b/src/events/SDL_events.c	Sun Oct 27 21:26:46 2013 -0400
     1.3 @@ -83,7 +83,7 @@
     1.4  } SDL_EventQ = { NULL, SDL_TRUE };
     1.5  
     1.6  
     1.7 -static __inline__ SDL_bool
     1.8 +static SDL_INLINE SDL_bool
     1.9  SDL_ShouldPollJoystick()
    1.10  {
    1.11  #if !SDL_JOYSTICK_DISABLED
    1.12 @@ -141,10 +141,8 @@
    1.13  
    1.14      /* Clear disabled event state */
    1.15      for (i = 0; i < SDL_arraysize(SDL_disabled_events); ++i) {
    1.16 -        if (SDL_disabled_events[i]) {
    1.17 -            SDL_free(SDL_disabled_events[i]);
    1.18 -            SDL_disabled_events[i] = NULL;
    1.19 -        }
    1.20 +        SDL_free(SDL_disabled_events[i]);
    1.21 +        SDL_disabled_events[i] = NULL;
    1.22      }
    1.23  
    1.24      while (SDL_event_watchers) {
    1.25 @@ -445,7 +443,7 @@
    1.26                  /* Polling and no events, just return */
    1.27                  return 0;
    1.28              }
    1.29 -            if (timeout > 0 && ((int) (SDL_GetTicks() - expiration) >= 0)) {
    1.30 +            if (timeout > 0 && SDL_TICKS_PASSED(SDL_GetTicks(), expiration)) {
    1.31                  /* Timeout expired and no events */
    1.32                  return 0;
    1.33              }