Fixed bug 1336 - Added a timestamp on all SDL events

Gueniffey 2011-11-23 04:11:31 PST

The attached simple patch adds a timestamp to all SDL events. It is useful to
dismiss old events and add UI responsiveness (my application does some
extensive tasks that creates a delay in the event queue handling. With this
patch, I can deal only with the most recent events.
This commit is contained in:
Sam Lantinga 2011-12-29 05:13:55 -05:00
parent a76f024ea9
commit 3a7d58ddf8
2 changed files with 22 additions and 1 deletions

View file

@ -358,7 +358,7 @@ int
SDL_PushEvent(SDL_Event * event)
{
SDL_EventWatcher *curr;
event->window.timestamp = SDL_GetTicks();
if (SDL_EventOK && !SDL_EventOK(SDL_EventOKParam, event)) {
return 0;
}