Open urcereal opened 3 years ago
Quick fix would be to add 1 to the axisMap so that we can return the none value if anything other than X, Y, Z, RX, RY, RZ is detected which would match the buttonMap I think. The getAxisIndex returns the none index for out of range values.
Getting Unknown axis runtime error with PS3 and PS4 V2 controllers. With the PS3 controller axis = 1 (kHIDUsage_GD_Pointer?) in getAxisIndex.
For PS4 V2 axis = 57 (0x39) which is kHIDUsage_GD_Hatswitch. The type is kIOHIDElementTypeInput_Misc and the usagePage is kHIDPage_GenericDesktop. This then calls getAxisIndex at line 106 of GamepadDeviceIOKit.cpp.
Running on macOS 11.2 using Xcode 12.4