Skip to content

Commit

Permalink
Merge pull request #15 from jimpick/mac-usb-enumerate-fix
Browse files Browse the repository at this point in the history
OS X enumerate fix: also look for IOKit in /System/Library/Frameworks
  • Loading branch information
ftheirs authored Oct 16, 2023
2 parents 64f9b4e + a445ccb commit 148be24
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion hidapi/mac/hid.c
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,11 @@ static io_service_t hidapi_IOHIDDeviceGetService(IOHIDDeviceRef device)
* and the fallback method will be used.
*/
if (iokit_framework == NULL) {
iokit_framework = dlopen("/System/Library/IOKit.framework/IOKit", RTLD_LAZY);
iokit_framework = dlopen("/System/Library/Frameworks/IOKit.framework/IOKit", RTLD_LAZY);

if (iokit_framework == NULL) {
iokit_framework = dlopen("/System/Library/IOKit.framework/IOKit", RTLD_LAZY);
}

if (iokit_framework != NULL)
dynamic_IOHIDDeviceGetService = dlsym(iokit_framework, "IOHIDDeviceGetService");
Expand Down

0 comments on commit 148be24

Please sign in to comment.