-
Notifications
You must be signed in to change notification settings - Fork 904
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Mac] Set a valid interface number on hid_device_info for USB HID dev…
…ices Previously the interface would never be set on Mac. This presents a big pain because retrieving interface numbers can be the only way to distinguish between the interfaces returned by HIDAPI. This change makes it possible to retrieve interface number from an hid_device_info on Mac for USB HID devices only. It is unclear if the Mac OS IOKit library returns valid interface numbers for non-HID USB devices. Because of this, I have opted to simply skip that case - leave it initialised to `-1`. In the future, we can easily relax this restriction if it turns out IOKit correctly returns interface number with non-HID USB devices. For now, this PR brings 90% of the value at 5% of the risk.
- Loading branch information
1 parent
a6a622f
commit 2bfcd3e
Showing
2 changed files
with
21 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters