sdlGetGamepadVendor function

int sdlGetGamepadVendor(
  1. Pointer<SdlGamepad> gamepad
)

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

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

\param gamepad the gamepad object to query. \returns the USB vendor ID, or zero if unavailable.

\since This function is available since SDL 3.1.3.

\sa SDL_GetGamepadVendorForID

extern SDL_DECLSPEC Uint16 SDLCALL SDL_GetGamepadVendor(SDL_Gamepad *gamepad)

Implementation

int sdlGetGamepadVendor(Pointer<SdlGamepad> gamepad) {
  final sdlGetGamepadVendorLookupFunction = libSdl3.lookupFunction<
      Uint16 Function(Pointer<SdlGamepad> gamepad),
      int Function(Pointer<SdlGamepad> gamepad)>('SDL_GetGamepadVendor');
  return sdlGetGamepadVendorLookupFunction(gamepad);
}