Function SDL_hid_open
pub unsafe extern "C" fn SDL_hid_open(
vendor_id: u16,
product_id: u16,
serial_number: *const u32,
) -> *mut SDL_hid_device
Available on crate feature
dep_sdl3
only.Expand description
Open a HID device using a Vendor ID (VID), Product ID (PID) and optionally a serial number.
If serial_number
is NULL, the first device with the specified VID and PID
is opened.
§Parameters
vendor_id
: the Vendor ID (VID) of the device to open.product_id
: the Product ID (PID) of the device to open.serial_number
: the Serial Number of the device to open (Optionally NULL).
§Return value
Returns a pointer to a SDL_hid_device
object on success or NULL on
failure; call SDL_GetError()
for more information.
§Availability
This function is available since SDL 3.2.0.