Function sdl2_sys::SDL_hid_open

source ·
pub unsafe extern "C" fn SDL_hid_open(
    vendor_id: c_ushort,
    product_id: c_ushort,
    serial_number: *const wchar_t
) -> *mut SDL_hid_device
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.

\param vendor_id The Vendor ID (VID) of the device to open. \param product_id The Product ID (PID) of the device to open. \param serial_number The Serial Number of the device to open (Optionally NULL). \returns a pointer to a SDL_hid_device object on success or NULL on failure.

\since This function is available since SDL 2.0.18.