Get the player index of an opened gamepad.
Defined in <SDL3/SDL_gamepad.h>
int SDL_GetGamepadPlayerIndex(SDL_Gamepad *gamepad);
SDL_Gamepad * | gamepad | the gamepad object to query. |
(int) Returns the player index for gamepad, or -1 if it's not available.
For XInput gamepads this returns the XInput user index.
This function is available since SDL 3.1.3.