sdlGetJoystickVendor function joystick

int sdlGetJoystickVendor(
  1. Pointer<SdlJoystick> joystick
)

Get the USB vendor ID of an opened joystick, if available.

If the vendor ID isn't available this function returns 0.

\param joystick the SDL_Joystick obtained from SDL_OpenJoystick(). \returns the USB vendor ID 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.

\sa SDL_GetJoystickVendorForID

extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetJoystickVendor(SDL_Joystick *joystick)

Implementation

int sdlGetJoystickVendor(Pointer<SdlJoystick> joystick) {
  final sdlGetJoystickVendorLookupFunction = _libSdl
      .lookupFunction<
        Uint16 Function(Pointer<SdlJoystick> joystick),
        int Function(Pointer<SdlJoystick> joystick)
      >('SDL_GetJoystickVendor');
  return sdlGetJoystickVendorLookupFunction(joystick);
}