SDL_PumpEvents(3)

SDL_PumpEvents3

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

Usage

#include "SDL3/SDL.h"

void SDL_PumpEvents(void);

Header file

Defined in SDL3/SDL_events.h

Overview

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.

Thread safety

This function should only be called on the main thread.

Releases

12 releases since Debian 3.0 (Woody); the text changed 2 times.

  1. 3.0–5.0
  2. 6.0–12
  3. 13

Availability

This function is available since SDL 3.2.0.

From libsdl3-doc 3.2.10+ds-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.