---
name: "SDL_PumpEvents"
section: "3"
platform: "linux"
package: "libsdl3-doc"
version: "3.2.10+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_PumpEvents"
---

# SDL\_PumpEvents(3)

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

## NAME

SDL\_PumpEvents - Pump the event loop, gathering events from the input devices.

## HEADER FILE

Defined in SDL3/SDL\_events.h

## SYNOPSIS

```
#include "SDL3/SDL.h"
```

**void SDL\_PumpEvents(void);**

## 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.

## THREAD SAFETY

This function should only be called on the main thread.

## AVAILABILITY

This function is available since SDL 3.2.0.

## SEE ALSO

**•**(3), [**SDL\_PollEvent**(3)](/SDL_PollEvent/3.md), **•**(3), [**SDL\_WaitEvent**(3)](/SDL_WaitEvent/3.md)
