sdlGetJoystickFromPlayerIndex function
Get the SDL_Joystick associated with a player index.
\param player_index the player index to get the SDL_Joystick for. \returns an SDL_Joystick on success or NULL on failure; call SDL_GetError() for more information.
\since This function is available since SDL 3.1.3.
\sa SDL_GetJoystickPlayerIndex \sa SDL_SetJoystickPlayerIndex
extern SDL_DECLSPEC SDL_Joystick * SDLCALL SDL_GetJoystickFromPlayerIndex(int player_index)
Implementation
Pointer<SdlJoystick> sdlGetJoystickFromPlayerIndex(int playerIndex) {
final sdlGetJoystickFromPlayerIndexLookupFunction = libSdl3.lookupFunction<
Pointer<SdlJoystick> Function(Int32 playerIndex),
Pointer<SdlJoystick> Function(
int playerIndex)>('SDL_GetJoystickFromPlayerIndex');
return sdlGetJoystickFromPlayerIndexLookupFunction(playerIndex);
}