sdlGetJoystickFirmwareVersion function joystick

int sdlGetJoystickFirmwareVersion(
  1. Pointer<SdlJoystick> joystick
)

Get the firmware version of an opened joystick, if available.

If the firmware version isn't available this function returns 0.

\param joystick the SDL_Joystick obtained from SDL_OpenJoystick(). \returns the firmware version of the selected joystick, or 0 if unavailable.

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

\since This function is available since SDL 3.2.0.

extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetJoystickFirmwareVersion(SDL_Joystick *joystick)

Implementation

int sdlGetJoystickFirmwareVersion(Pointer<SdlJoystick> joystick) {
  final sdlGetJoystickFirmwareVersionLookupFunction = _libSdl
      .lookupFunction<
        Uint16 Function(Pointer<SdlJoystick> joystick),
        int Function(Pointer<SdlJoystick> joystick)
      >('SDL_GetJoystickFirmwareVersion');
  return sdlGetJoystickFirmwareVersionLookupFunction(joystick);
}