SDL_GamepadDeviceEvent Struct Reference

`#include <SDL_events.h>`

## Data Fields

SDL_EventType | type
Uint32 | reserved
Uint64 | timestamp
SDL_JoystickID | which

## Detailed Description

Gamepad device event structure (event.gdevice.*)

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.

Since
  This struct is available since SDL 3.2.0.

See also
  SDL_JoyDeviceEvent

Definition at line 660 of file SDL_events.h.

## Field Documentation

## reserved

Uint32 SDL_GamepadDeviceEvent::reserved

Definition at line 663 of file SDL_events.h.

## timestamp

Uint64 SDL_GamepadDeviceEvent::timestamp

In nanoseconds, populated using SDL_GetTicksNS()

Definition at line 664 of file SDL_events.h.

## type

SDL_EventType SDL_GamepadDeviceEvent::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

Definition at line 662 of file SDL_events.h.

## which

SDL_JoystickID SDL_GamepadDeviceEvent::which

The joystick instance id

Definition at line 665 of file SDL_events.h.

The documentation for this struct was generated from the following file:

- SDL_events.h