sdlHidEnumerate function
Enumerate the HID Devices.
This function returns a linked list of all the HID devices attached to the
system which match vendor_id and product_id. If vendor_id
is set to 0
then any vendor matches. If product_id
is set to 0 then any product
matches. If vendor_id
and product_id
are both set to 0, then all HID
devices will be returned.
\param vendor_id The Vendor ID (VID) of the types of device to open. \param product_id The Product ID (PID) of the types of device to open. \returns a pointer to a linked list of type SDL_hid_device_info, containing information about the HID devices attached to the system, or NULL in the case of failure. Free this linked list by calling SDL_hid_free_enumeration().
\since This function is available since SDL 2.0.18.
\sa SDL_hid_device_change_count
extern DECLSPEC SDL_hid_device_info * SDLCALL SDL_hid_enumerate(unsigned short vendor_id, unsigned short product_id)
Implementation
Pointer<SdlHidDeviceInfo> sdlHidEnumerate(int vendorId, int productId) {
final sdlHidEnumerateLookupFunction = libSdl2.lookupFunction<
Pointer<SdlHidDeviceInfo> Function(Uint16 vendorId, Uint16 productId),
Pointer<SdlHidDeviceInfo> Function(
int vendorId, int productId)>('SDL_hid_enumerate');
return sdlHidEnumerateLookupFunction(vendorId, productId);
}