SDL_GetJoysticks - Man Page
Get a list of currently connected joysticks.
Synopsis
#include <SDL3/SDL_joystick.h> SDL_JoystickID * SDL_GetJoysticks(int *count);
Function Parameters
- count
a pointer filled in with the number of joysticks returned, may be NULL.
Return Value
Returns a 0 terminated array of joystick instance IDs or NULL on failure; call SDL_GetError() for more information. This should be freed with SDL_free() when it is no longer needed.
Thread Safety
It is safe to call this function from any thread.
Availability
This function is available since SDL 3.2.0.
See Also
Referenced By
SDL_GetJoystickNameForID(3), SDL_GetJoystickPathForID(3), SDL_GetJoystickPlayerIndexForID(3), SDL_GetJoystickProductForID(3), SDL_GetJoystickProductVersionForID(3), SDL_GetJoystickTypeForID(3), SDL_GetJoystickVendorForID(3), SDL_HasJoystick(3), SDL_IsGamepad(3).
SDL 3.3.2 Simple Directmedia Layer SDL3 FUNCTIONS