getPlayerIndex method
Get the player index of an opened gamepad.
For XInput gamepads this returns the XInput user index.
\param gamepad the gamepad object to query. \returns the player index for gamepad, or -1 if it's not available.
\since This function is available since SDL 3.1.3.
\sa SDL_SetGamepadPlayerIndex
extern SDL_DECLSPEC int SDLCALL SDL_GetGamepadPlayerIndex(SDL_Gamepad *gamepad)
Implementation
int getPlayerIndex() {
return sdlGetGamepadPlayerIndex(this);
}