SDL 2.0
SDL_ControllerDeviceEvent Struct Reference

#include <SDL_events.h>

Data Fields

Uint32 type
 
Uint32 timestamp
 
Sint32 which
 

Detailed Description

Controller device event structure (event.cdevice.*)

Joysticks that are supported game controllers receive both an SDL_JoyDeviceEvent and an SDL_ControllerDeviceEvent.

SDL will send CONTROLLERDEVICEADDED events for joysticks that are already plugged in during SDL_Init() and are recognized as game controllers.

Definition at line 480 of file SDL_events.h.

Field Documentation

◆ timestamp

Uint32 SDL_ControllerDeviceEvent::timestamp

In milliseconds, populated using SDL_GetTicks()

Definition at line 483 of file SDL_events.h.

◆ type

Uint32 SDL_ControllerDeviceEvent::type

SDL_CONTROLLERDEVICEADDED, SDL_CONTROLLERDEVICEREMOVED, SDL_CONTROLLERDEVICEREMAPPED, or SDL_CONTROLLERSTEAMHANDLEUPDATED

Definition at line 482 of file SDL_events.h.

◆ which

Sint32 SDL_ControllerDeviceEvent::which

The joystick device index for the ADDED event, instance id for the REMOVED or REMAPPED event

Definition at line 484 of file SDL_events.h.


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