src/events/SDL_events.c
changeset 8464 a2a909304cfe
parent 8461 ca8dad9be3d4
parent 7082 e9d6004d2978
child 8465 be2dce468a8c
     1.1 --- a/src/events/SDL_events.c	Tue Apr 16 23:40:03 2013 -0400
     1.2 +++ b/src/events/SDL_events.c	Sun Apr 21 12:38:44 2013 -0400
     1.3 @@ -132,12 +132,6 @@
     1.4         FIXME: Does this introduce any other bugs with events at startup?
     1.5       */
     1.6  
     1.7 -    /* No filter to start with, process most event types */
     1.8 -    SDL_EventOK = NULL;
     1.9 -    SDL_EventState(SDL_TEXTINPUT, SDL_DISABLE);
    1.10 -    SDL_EventState(SDL_TEXTEDITING, SDL_DISABLE);
    1.11 -    SDL_EventState(SDL_SYSWMEVENT, SDL_DISABLE);
    1.12 -
    1.13      /* Create the lock and set ourselves active */
    1.14  #if !SDL_THREADS_DISABLED
    1.15      if (!SDL_EventQ.lock) {
    1.16 @@ -147,6 +141,13 @@
    1.17          return (-1);
    1.18      }
    1.19  #endif /* !SDL_THREADS_DISABLED */
    1.20 +
    1.21 +    /* No filter to start with, process most event types */
    1.22 +    SDL_EventOK = NULL;
    1.23 +    SDL_EventState(SDL_TEXTINPUT, SDL_DISABLE);
    1.24 +    SDL_EventState(SDL_TEXTEDITING, SDL_DISABLE);
    1.25 +    SDL_EventState(SDL_SYSWMEVENT, SDL_DISABLE);
    1.26 +
    1.27      SDL_EventQ.active = 1;
    1.28  
    1.29      return (0);
    1.30 @@ -373,7 +374,7 @@
    1.31  SDL_PushEvent(SDL_Event * event)
    1.32  {
    1.33      SDL_EventWatcher *curr;
    1.34 -    event->generic.timestamp = SDL_GetTicks();
    1.35 +    event->common.timestamp = SDL_GetTicks();
    1.36      if (SDL_EventOK && !SDL_EventOK(SDL_EventOKParam, event)) {
    1.37          return 0;
    1.38      }