SDL_GetGamepadPlayerIndex - Man Page
Get the player index of an opened gamepad.
Synopsis
#include <SDL3/SDL_gamepad.h> int SDL_GetGamepadPlayerIndex(SDL_Gamepad *gamepad);
Description
For XInput gamepads this returns the XInput user index.
Function Parameters
- gamepad
the gamepad object to query.
Return Value
Returns the player index for gamepad, or -1 if it's not available.
Thread Safety
It is safe to call this function from any thread.
Availability
This function is available since SDL 3.2.0.
See Also
Info
SDL 3.4.20 Simple Directmedia Layer SDL3 FUNCTIONS