Mercurial > sdl-ios-xcode
diff include/SDL_events.h @ 3072:9da8f57ab92c
Fixed bug #684
Reworked Pierre's patch a little bit, which added SDL_WaitEventTimeout()
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 17 Feb 2009 05:59:40 +0000 |
parents | 99210400e8b9 |
children | 88861448961f 0c85abc61e47 |
line wrap: on
line diff
--- a/include/SDL_events.h Tue Feb 17 05:57:54 2009 +0000 +++ b/include/SDL_events.h Tue Feb 17 05:59:40 2009 +0000 @@ -412,6 +412,14 @@ */ extern DECLSPEC int SDLCALL SDL_WaitEvent(SDL_Event * event); +/* Waits until the specified timeout (in milliseconds) for the next available + event, returning 1, or 0 if there was an error while waiting for events. If + 'event' is not NULL, the next event is removed from the queue and stored in + that area. + */ +extern DECLSPEC int SDLCALL SDL_WaitEventTimeout(SDL_Event * event, + int timeout); + /* Add an event to the event queue. This function returns 1 on success, 0 if the event was filtered, or -1 if the event queue was full or there was some other error.