Controller device event structure (event.cdevice.*)
Defined in SDL_events.h
typedef struct SDL_ControllerDeviceEvent
{/**< SDL_CONTROLLERDEVICEADDED, SDL_CONTROLLERDEVICEREMOVED, SDL_CONTROLLERDEVICEREMAPPED, or SDL_CONTROLLERSTEAMHANDLEUPDATED */
Uint32 type; /**< In milliseconds, populated using SDL_GetTicks() */
Uint32 timestamp; /**< The joystick device index for the ADDED event, instance id for the REMOVED or REMAPPED event */
Sint32 which; } SDL_ControllerDeviceEvent;
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.