Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
WIP - ControllerInterface: Some attempts at making macOS joystick input more reliable. #7760
Apparently some devices like to return elements with duplicate usages. This has caused axes to malfunction in the past and was fixed by ignoring all except the last element for each usage.
I've hopefully found a middle ground where duplicate axes are used but named differently.
There are reports of missing buttons.
The button enumeration code is pretty straightforward so I can only assume that they are being named inappropriately.
Only one "hatswitch" was supported.
GetState calls no longer invoke IOHIDElementGetLogicalMin/Max.
I've renamed "Input" to "IOKit".
Code is untested as I lack macOS.