Initialize the IOHIDManager. Return 0 for success and -1 for failure. */
| 435 | |
| 436 | /* Initialize the IOHIDManager. Return 0 for success and -1 for failure. */ |
| 437 | static int init_hid_manager(void) |
| 438 | { |
| 439 | /* Initialize all the HID Manager Objects */ |
| 440 | hid_mgr = IOHIDManagerCreate(kCFAllocatorDefault, kIOHIDOptionsTypeNone); |
| 441 | if (hid_mgr) { |
| 442 | IOHIDManagerSetDeviceMatching(hid_mgr, NULL); |
| 443 | IOHIDManagerScheduleWithRunLoop(hid_mgr, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode); |
| 444 | return 0; |
| 445 | } |
| 446 | |
| 447 | register_global_error("Failed to create IOHIDManager"); |
| 448 | return -1; |
| 449 | } |
| 450 | |
| 451 | HID_API_EXPORT const struct hid_api_version* HID_API_CALL hid_version(void) |
| 452 | { |
no test coverage detected