hidapi
hidapi copied to clipboard
A Simple cross-platform library for communicating with HID devices
We could do both: allow SDL filter out devices like this, _and_ avoid patching HIDAPI sources if we would introduce something like: ```c typedef int (*HID_API_CALL hidapi_ven_dev_filter_func)(unsigned short vendor_id, unsigned...
The get_usb_string call is rather expensive on some USB devices, so we cache the vendor/product strings for future lookups (e.g. when hid_enumerate is invoked again later). This way, we only...
Coverity issue CID1530056 Low impact - tests only. CC: @JoergAtGithub
* https://github.com/libusb/hidapi/issues/274#issuecomment-1543512022 It would be good we have a FreeBSD specific backend using hidraw for HIDAPI so that FreeBSD HIDAPI users no longer need to use the libusb backend. Reference:...
Some devices may require much longer timeout when submitting hid_send_feature_report() . for such devices hid_send_feature_report() just notifies failure with return value of -1 . I checked that internal error code...
On windows, we currently inspect the parent devnode to get `bus_type`: https://github.com/libusb/hidapi/blob/4ebce6b5059b086d05ca7e091ce04a5fd08ac3ac/windows/hid.c#L498-L552 However, some filtered HID device (e.g. [imbushuo/mac-precision-touchpad](https://github.com/imbushuo/mac-precision-touchpad)) whose parent is the filter driver, which don't have a correct...
_Originally posted by @DJm00n in https://github.com/libusb/hidapi/issues/299#issuecomment-1521246202_
https://github.com/libusb/hidapi/blob/2b70208feabeb4cb524dff58c450af63544790bc/hidapi/hidapi.h#L33 This does not make sense. `dllexport` is normally always used in combination with `dllimport` (https://learn.microsoft.com/en-us/cpp/cpp/dllexport-dllimport).
Looks like Windows Bluetooth drivers have issues with sending output reports with `WriteFile`. Need to investigate this and try to use `HidD_SetOutputReport` as a fallback. https://stackoverflow.com/questions/29480144/hidapi-sending-packet-smaller-than-caps-outputreportbytelength https://social.msdn.microsoft.com/Forums/ie/en-US/834d2cf2-672d-424b-a126-dbc69f3f75a2/hiddsetoutputreportwritefile-bluetooth-low-energy-windows-81 Related https://github.com/libsdl-org/SDL/issues/7224