sdlJoystickSetPlayerIndex function

void sdlJoystickSetPlayerIndex(
  1. Pointer<SdlJoystick> joystick,
  2. int playerIndex
)

Set the player index of an opened joystick.

\param joystick the SDL_Joystick obtained from SDL_JoystickOpen() \param player_index Player index to assign to this joystick, or -1 to clear the player index and turn off player LEDs.

\since This function is available since SDL 2.0.12.

extern DECLSPEC void SDLCALL SDL_JoystickSetPlayerIndex(SDL_Joystick *joystick, int player_index)

Implementation

void sdlJoystickSetPlayerIndex(Pointer<SdlJoystick> joystick, int playerIndex) {
  final sdlJoystickSetPlayerIndexLookupFunction = libSdl2.lookupFunction<
      Void Function(Pointer<SdlJoystick> joystick, Int32 playerIndex),
      void Function(Pointer<SdlJoystick> joystick,
          int playerIndex)>('SDL_JoystickSetPlayerIndex');
  return sdlJoystickSetPlayerIndexLookupFunction(joystick, playerIndex);
}