docs: Explain events for already plugged in controllers

This commit is contained in:
Jordan Christiansen authored and Sam Lantinga committed 2024-10-27 14:41:06 -07:00
1 parent e5348c611d
commit a22baafcf4
2 files changed
+21

No files matched your search

+11
View File
@@ -412,6 +412,11 @@ typedef struct SDL_JoyButtonEvent
/**
* Joystick device event structure (event.jdevice.*)
*
* SDL will send JOYSTICK_ADDED events for devices that
* are already plugged in during SDL_Init.
*
* \sa SDL_ControllerDeviceEvent
*/
typedef struct SDL_JoyDeviceEvent
{
@@ -465,6 +470,12 @@ typedef struct SDL_ControllerButtonEvent
/**
* 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.
*/
typedef struct SDL_ControllerDeviceEvent
{