sdlGameControllerGetVendor function

int sdlGameControllerGetVendor(
  1. Pointer<SdlGameController> gamecontroller
)

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

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

\param gamecontroller the game controller object to query. \return the USB vendor ID, or zero if unavailable.

\since This function is available since SDL 2.0.6.

extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetVendor(SDL_GameController *gamecontroller)

Implementation

int sdlGameControllerGetVendor(Pointer<SdlGameController> gamecontroller) {
  final sdlGameControllerGetVendorLookupFunction = libSdl2.lookupFunction<
          Uint16 Function(Pointer<SdlGameController> gamecontroller),
          int Function(Pointer<SdlGameController> gamecontroller)>(
      'SDL_GameControllerGetVendor');
  return sdlGameControllerGetVendorLookupFunction(gamecontroller);
}