Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS game controller problem #51

Open
urcereal opened this issue Feb 9, 2021 · 1 comment
Open

macOS game controller problem #51

urcereal opened this issue Feb 9, 2021 · 1 comment

Comments

@urcereal
Copy link

urcereal commented Feb 9, 2021

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

@urcereal
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant