logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

SDL_PumpEvents - Pump the event loop, gathering events from the input devices.

Availability

       This function is available since SDL 3.2.0.

Description

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

       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.

Name

       SDL_PumpEvents - Pump the event loop, gathering events from the input devices.

See Also

SDL_PollEvent(3), SDL_WaitEvent(3)

Simple Directmedia Layer                           SDL 3.2.20                                  SDL_PumpEvents(3)

Synopsis

#include<SDL3/SDL_events.h>voidSDL_PumpEvents(void);

Thread Safety

       This function should only be called on the main thread.

See Also