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