~ubuntu-branches/ubuntu/trusty/libsdl2/trusty-proposed

« back to all changes in this revision

Viewing changes to src/events/SDL_events.c

  • Committer: Package Import Robot
  • Author(s): Manuel A. Fernandez Montecelo
  • Date: 2013-12-28 12:31:19 UTC
  • mto: (7.1.3 sid)
  • mto: This revision was merged to the branch mainline in revision 7.
  • Revision ID: package-import@ubuntu.com-20131228123119-wehupm72qsjvh6vz
Tags: upstream-2.0.1+dfsg1
ImportĀ upstreamĀ versionĀ 2.0.1+dfsg1

Show diffs side-by-side

added added

removed removed

Lines of Context:
83
83
} SDL_EventQ = { NULL, SDL_TRUE };
84
84
 
85
85
 
86
 
static __inline__ SDL_bool
 
86
static SDL_INLINE SDL_bool
87
87
SDL_ShouldPollJoystick()
88
88
{
89
89
#if !SDL_JOYSTICK_DISABLED
141
141
 
142
142
    /* Clear disabled event state */
143
143
    for (i = 0; i < SDL_arraysize(SDL_disabled_events); ++i) {
144
 
        if (SDL_disabled_events[i]) {
145
 
            SDL_free(SDL_disabled_events[i]);
146
 
            SDL_disabled_events[i] = NULL;
147
 
        }
 
144
        SDL_free(SDL_disabled_events[i]);
 
145
        SDL_disabled_events[i] = NULL;
148
146
    }
149
147
 
150
148
    while (SDL_event_watchers) {
445
443
                /* Polling and no events, just return */
446
444
                return 0;
447
445
            }
448
 
            if (timeout > 0 && ((int) (SDL_GetTicks() - expiration) >= 0)) {
 
446
            if (timeout > 0 && SDL_TICKS_PASSED(SDL_GetTicks(), expiration)) {
449
447
                /* Timeout expired and no events */
450
448
                return 0;
451
449
            }