commit | 591bf09c87144f68d921c92699829dcf7176d3f3 | [log] [tgz] |
---|---|---|
author | Cameron Gutman <aicommander@gmail.com> | Fri Dec 20 22:25:49 2019 -0800 |
committer | Cameron Gutman <aicommander@gmail.com> | Fri Dec 20 22:25:49 2019 -0800 |
tree | 706d9673e4fd35d069e4d6901b77c434b0c846af | |
parent | 1b32b0934a63516def845936c8bc22e8834652e4 [diff] |
Use IOHIDManagerRegisterDeviceRemovalCallback() to monitor for HID removal The function we currently use, IOHIDDeviceRegisterRemovalCallback(), often fails on Catalina with a "__CFRunLoopModeFindSourceForMachPort returned NULL" error message. Once a removal callback is missed, we will eventually crash when the joystick is closed attempting to use the invalid IOHIDDeviceRef. https://forums.developer.apple.com/thread/124444