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:
parent
a76f024ea9
commit
3a7d58ddf8
2 changed files with 22 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue