logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

SDL_GetGamepadPlayerIndex - Get the player index of an opened gamepad.

Availability

       This function is available since SDL 3.2.0.

Description

       For XInput gamepads this returns the XInput user index.

Function Parameters

gamepad
              the gamepad object to query.

Header File

       Defined in SDL3/SDL_gamepad.h

Name

       SDL_GetGamepadPlayerIndex - Get the player index of an opened gamepad.

Return Value

       Returns the player index for gamepad, or -1 if it's not available.

See Also

(3), SDL_SetGamepadPlayerIndex(3)

Simple Directmedia Layer                           SDL 3.2.10                       SDL_GetGamepadPlayerIndex(3)

Synopsis

#include"SDL3/SDL.h"intSDL_GetGamepadPlayerIndex(SDL_Gamepad*gamepad);

See Also