sdlJoystickGetDevicePlayerIndex function

int sdlJoystickGetDevicePlayerIndex(
  1. int deviceIndex
)

Get the player index of a joystick, or -1 if it's not available This can be called before any joysticks are opened.

\since This function is available since SDL 2.0.9.

extern DECLSPEC int SDLCALL SDL_JoystickGetDevicePlayerIndex(int device_index)

Implementation

int sdlJoystickGetDevicePlayerIndex(int deviceIndex) {
  final sdlJoystickGetDevicePlayerIndexLookupFunction = libSdl2.lookupFunction<
      Int32 Function(Int32 deviceIndex),
      int Function(int deviceIndex)>('SDL_JoystickGetDevicePlayerIndex');
  return sdlJoystickGetDevicePlayerIndexLookupFunction(deviceIndex);
}