22 lines
771 B
Text
22 lines
771 B
Text
|
rename hid_init() to hidapi_hid_init() to avoid collision with usbhid
|
||
|
|
||
|
Index: hidtest/test.c
|
||
|
--- hidtest/test.c.orig
|
||
|
+++ hidtest/test.c
|
||
|
@@ -93,12 +93,12 @@ int main(int argc, char* argv[])
|
||
|
printf("Compile-time version is different than runtime version of hidapi.\n]n");
|
||
|
}
|
||
|
|
||
|
- if (hid_init())
|
||
|
+ if (hidapi_hid_init())
|
||
|
return -1;
|
||
|
|
||
|
#if defined(__APPLE__) && HID_API_VERSION >= HID_API_MAKE_VERSION(0, 12, 0)
|
||
|
- // To work properly needs to be called before hid_open/hid_open_path after hid_init.
|
||
|
- // Best/recommended option - call it right after hid_init.
|
||
|
+ // To work properly needs to be called before hid_open/hid_open_path after hidapi_hid_init.
|
||
|
+ // Best/recommended option - call it right after hidapi_hid_init.
|
||
|
hid_darwin_set_open_exclusive(0);
|
||
|
#endif
|
||
|
|