sdlGetGamepadVendorForId function

int sdlGetGamepadVendorForId(
  1. int instanceId
)

Get the USB vendor ID of a gamepad, if available.

This can be called before any gamepads are opened. If the vendor ID isn't available this function returns 0.

\param instance_id the joystick instance ID. \returns the USB vendor ID of the selected gamepad. If called on an invalid index, this function returns zero.

\since This function is available since SDL 3.1.3.

\sa SDL_GetGamepadVendor \sa SDL_GetGamepads

extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetGamepadVendorForID(SDL_JoystickID instance_id)

Implementation

int sdlGetGamepadVendorForId(int instanceId) {
  final sdlGetGamepadVendorForIdLookupFunction = libSdl3.lookupFunction<
      Uint16 Function(Uint32 instanceId),
      int Function(int instanceId)>('SDL_GetGamepadVendorForID');
  return sdlGetGamepadVendorForIdLookupFunction(instanceId);
}