Mercurial > sdl-ios-xcode
diff src/events/SDL_keyboard.c @ 1731:875c3cf1a12c SDL-1.3
SDL_PushEvent() calls the event filter code, and has a return value to tell
whether or not the event was actually pushed.
SDL_GetEventFilter() now returns an SDL_bool instead of the filter function.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sat, 08 Jul 2006 20:07:08 +0000 |
parents | 6c63fc2bd986 |
children | fd65f12b6de6 |
line wrap: on
line diff
--- a/src/events/SDL_keyboard.c Sat Jul 08 18:06:02 2006 +0000 +++ b/src/events/SDL_keyboard.c Sat Jul 08 20:07:08 2006 +0000 @@ -664,10 +664,7 @@ keyboard->repeat.firsttime = 1; keyboard->repeat.timestamp = 1; } - if ((SDL_EventOK == NULL) || SDL_EventOK(SDL_EventOKParam, &event)) { - posted = 1; - SDL_PushEvent(&event); - } + posted = (SDL_PushEvent(&event) > 0); } return (posted); } @@ -690,10 +687,7 @@ event.text.which = (Uint8) index; SDL_strlcpy(event.text.text, text, SDL_arraysize(event.text.text)); event.key.windowID = keyboard->focus; - if ((SDL_EventOK == NULL) || SDL_EventOK(SDL_EventOKParam, &event)) { - posted = 1; - SDL_PushEvent(&event); - } + posted = (SDL_PushEvent(&event) > 0); } return (posted); } @@ -726,11 +720,7 @@ } else { if (interval > (Uint32) keyboard->repeat.interval) { keyboard->repeat.timestamp = now; - if ((SDL_EventOK == NULL) - || SDL_EventOK(SDL_EventOKParam, - &keyboard->repeat.evt)) { - SDL_PushEvent(&keyboard->repeat.evt); - } + SDL_PushEvent(&keyboard->repeat.evt); } } }