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

# SDL\_GamepadDeviceEvent(3type)

Gamepad device event structure (event.gdevice.\*)

## NAME

SDL\_GamepadDeviceEvent - Gamepad device event structure (event.gdevice.\*)

## HEADER FILE

Defined in SDL3/SDL\_events.h

## SYNOPSIS

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

**typedef struct SDL\_GamepadDeviceEvent** **{**     **SDL\_EventType type; /\*\*\< SDL\_EVENT\_GAMEPAD\_ADDED, SDL\_EVENT\_GAMEPAD\_REMOVED, or SDL\_EVENT\_GAMEPAD\_REMAPPED, SDL\_EVENT\_GAMEPAD\_UPDATE\_COMPLETE or SDL\_EVENT\_GAMEPAD\_STEAM\_HANDLE\_UPDATED \*/**     **Uint32 reserved;**     **Uint64 timestamp;   /\*\*\< In nanoseconds, populated using SDL\_GetTicksNS() \*/**     **SDL\_JoystickID which;       /\*\*\< The joystick instance id \*/** **} SDL\_GamepadDeviceEvent;**

## DESCRIPTION

Joysticks that are supported gamepads receive both an

**SDL\_JoyDeviceEvent**\
  and an

**SDL\_GamepadDeviceEvent** .

SDL will send GAMEPAD\_ADDED events for joysticks that are already plugged in during  **SDL\_Init** () and are recognized as gamepads. It will also send events for joysticks that get gamepad mappings at runtime.

## AVAILABILITY

This struct is available since SDL 3.2.0.

## SEE ALSO

**•**(3), [**SDL\_JoyDeviceEvent**(3type)](/SDL_JoyDeviceEvent/3type.md)
