Added SDL_GetGamepadInstanceID()

This commit is contained in:
Sam Lantinga
2023-07-10 19:13:42 -07:00
parent 50277a0355
commit 3cbf16b944
5 changed files with 27 additions and 0 deletions

View File

@@ -476,6 +476,20 @@ extern DECLSPEC SDL_Gamepad *SDLCALL SDL_GetGamepadFromInstanceID(SDL_JoystickID
*/
extern DECLSPEC SDL_Gamepad *SDLCALL SDL_GetGamepadFromPlayerIndex(int player_index);
/**
* Get the instance ID of an opened gamepad.
*
* \param gamepad a gamepad identifier previously returned by
* SDL_OpenGamepad()
* \returns the instance ID of the specified gamepad on success or 0 on
* failure; call SDL_GetError() for more information.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_OpenGamepad
*/
extern DECLSPEC SDL_JoystickID SDLCALL SDL_GetGamepadInstanceID(SDL_Gamepad *gamepad);
/**
* Get the implementation-dependent name for an opened gamepad.
*