Get the player index of a joystick.
Defined in <SDL3/SDL_joystick.h>
int SDL_GetJoystickPlayerIndexForID(SDL_JoystickID instance_id);
SDL_JoystickID | instance_id | the joystick instance ID. |
(int) Returns the player index of a joystick, or -1 if it's not available.
This can be called before any joysticks are opened.
This function is available since SDL 3.1.3.