sdlJoystickFromPlayerIndex function

Pointer<SdlJoystick> sdlJoystickFromPlayerIndex(
  1. int playerIndex
)

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 2.0.12.

extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickFromPlayerIndex(int player_index)

Implementation

Pointer<SdlJoystick> sdlJoystickFromPlayerIndex(int playerIndex) {
  final sdlJoystickFromPlayerIndexLookupFunction = libSdl2.lookupFunction<
      Pointer<SdlJoystick> Function(Int32 playerIndex),
      Pointer<SdlJoystick> Function(
          int playerIndex)>('SDL_JoystickFromPlayerIndex');
  return sdlJoystickFromPlayerIndexLookupFunction(playerIndex);
}