sdlGetJoystickType function joystick

int sdlGetJoystickType(
  1. Pointer<SdlJoystick> joystick
)

Get the type of an opened joystick.

\param joystick the SDL_Joystick obtained from SDL_OpenJoystick(). \returns the SDL_JoystickType of the selected joystick.

\threadsafety It is safe to call this function from any thread.

\since This function is available since SDL 3.2.0.

\sa SDL_GetJoystickTypeForID

extern SDL_DECLSPEC SDL_JoystickType SDLCALL SDL_GetJoystickType(SDL_Joystick *joystick)

Implementation

int sdlGetJoystickType(Pointer<SdlJoystick> joystick) {
  final sdlGetJoystickTypeLookupFunction = _libSdl
      .lookupFunction<
        Int32 Function(Pointer<SdlJoystick> joystick),
        int Function(Pointer<SdlJoystick> joystick)
      >('SDL_GetJoystickType');
  return sdlGetJoystickTypeLookupFunction(joystick);
}