hidapi
hidapi copied to clipboard
macOS: Framework location corrected.
Hi,
according to
https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/OSX_Technology_Overview/SystemFrameworks/SystemFrameworks.html
IOKit.framework is located at "/System/Library/Frameworks/", but hidapi/mac/hid.c:hidapi_IOHIDDeviceGetService() tries to find it at "/System/Library/". That fails and at least on macOS 10.14 the fallback method seems to not working too, so that hid_enumerate() cannot determine a path. A subsequent call of hid_open() fails due to the empty path.
Was this tested on earlier mac versions?
Please consider making this PR at https://github.com/libusb/hidapi See #373