Wiki Page Content

Differences between revisions 2 and 5 (spanning 3 versions)
Revision 2 as of 2010-07-29 19:08:19
Size: 1269
Editor: SheenaSmith
Comment: update content (old wiki)
Revision 5 as of 2015-10-29 21:50:22
Size: 1246
Comment: Added text to warning sign.
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
||<tablewidth="100%" style="color: #FF0000;" :> DRAFT||
Line 23: Line 22:
This should only be run in the thread that sets the video mode.  <<Color2(green,Is this a serious enough note that it should have an icon to emphasize it?)>> /!\ WARNING: This should only be run in the thread that initialized the video subsystem, and for extra safety, you should consider only doing those things on the main thread in any case.
Line 25: Line 24:
*<<BR>>[[SDL_PumpEvents]]() gathers all the pending input information from devices and places it on the event queue. Without calls to [[SDL_PumpEvents]]() no events would ever be placed on the queue. Often the need for calls to [[SDL_PumpEvents]]() is hidden from the user since [[SDL_PollEvent]]() and [[SDL_WaitEvent]]() implicitly call [[SDL_PumpEvents]](). However, if you are not polling or waiting for events (e.g. you are filtering them), then you must call [[SDL_PumpEvents]]() to force an event queue update.<<BR>>* [[SDL_PumpEvents]]() gathers all the pending input information from devices and places it in the event queue. Without calls to [[SDL_PumpEvents]]() no events would ever be placed on the queue. Often the need for calls to [[SDL_PumpEvents]]() is hidden from the user since [[SDL_PollEvent]]() and [[SDL_WaitEvent]]() implicitly call [[SDL_PumpEvents]](). However, if you are not polling or waiting for events (e.g. you are filtering them), then you must call [[SDL_PumpEvents]]() to force an event queue update.
Line 28: Line 27:
 .[[SDL_PollEvent]] *  .[[SDL_PollEvent]]
.[[SDL_WaitEvent]]

SDL_PumpEvents

Use this function to pump the event loop, gathering events from the input devices.

Syntax

void SDL_PumpEvents(void)

Code Examples

You can add your code example here

Remarks

This function updates the event queue and internal input device state.

/!\ WARNING: This should only be run in the thread that initialized the video subsystem, and for extra safety, you should consider only doing those things on the main thread in any case.

SDL_PumpEvents() gathers all the pending input information from devices and places it in the event queue. Without calls to SDL_PumpEvents() no events would ever be placed on the queue. Often the need for calls to SDL_PumpEvents() is hidden from the user since SDL_PollEvent() and SDL_WaitEvent() implicitly call SDL_PumpEvents(). However, if you are not polling or waiting for events (e.g. you are filtering them), then you must call SDL_PumpEvents() to force an event queue update.


CategoryAPI, CategoryEvents

None: SDL_PumpEvents (last edited 2015-10-29 21:50:22 by PhilippWiesemann)

(Page Info.)
Feedback
Please include your contact information if you'd like to receive a reply.
Submit