oakmound / oak

A pure Go game engine
Apache License 2.0
1.56k stars 83 forks source link

OSX Controller Support #87

Open 200sc opened 5 years ago

200sc commented 5 years ago

We don't have access to a mac to test on, so controller support hasn't been implemented or tested on a mac. We should resolve this.

200sc commented 3 years ago

Documenting research: We must interact with OSX's IOHIDManager: https://developer.apple.com/documentation/iokit/iohidmanager_h?language=objc OSX's kernel will claim all HID devices, which controllers will qualify as, as soon as they are connected to the machine, and require that they are read from via IOHIDManager.

We could either attempt to manually use IOHIDManager's API, or use libusb's hidapi: https://github.com/libusb/hidapi