Skip to content

Commit

Permalink
OS X enumerate fix: also look for IOKit in /System/Library/Frameworks
Browse files Browse the repository at this point in the history
It appears the location of the library has moved recently.
  • Loading branch information
jimpick committed Sep 26, 2023
1 parent 64f9b4e commit a445ccb
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 a445ccb

Please sign in to comment.