-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
ABXY button mapping incorrect for Nintendo Switch Pro Controller #88693
Comments
I get similar mapping errors with an Xbox One controller on Mac, using a similar system and Godot 4.3.dev setup, as in #68976 |
I tested my Xbox Wireless Controller (model 1708) on 4.3.dev3, and its inputs appear to be working as expected: CleanShot.2024-02-28.at.09.52.07.mp4On v4.3.dev.gh [b15105a], the Xbox Wireless Controller's ABXY buttons all seem to be mapped correctly for me as well. However, Godot no longer recognizes controller inputs when it is not focused: Xbox.Controller.on.v4.3.dev.gh.b15105a35.mp4I'm not sure if this is something I should open a new issue for...? 😅 |
It should be possible to enable background listening (it's off by default on macOS 11.3+). |
I was able to clone, build, and run the Godot source today for the first time! 😁 I might see spots in the code that could be responsible for the button mapping issue, so I'll see if I can fix it. |
You are correct, this version fixes the xbox one controller mapping issue for me. Thanks! |
Okay, so upon a little further investigation, I have good news and bad news. The good news: this doesn't appear to be a bug in Godot or #80709 ! The bad news: it's just how Apple decided the Pro Controller should be mapped. 🙃 Switch.Pro.Controller.Mapping.Messed.Up.By.Apple.mp4I assume Apple did this with the intent of preserving the "semantic meaning" of the buttons - the right button is "confirm" everywhere, the bottom button is "cancel" everywhere, etc. But it's quite frustrating that this no longer has a consistent physical mapping across controllers. How should the Godot side proceed with this? If anyone else happens to be familiar with the GameController API and knows a good solution to this, then that would be great! Otherwise, over the coming days, I may see what I can learn about it and if there's a way to query the controller for the hardware-level buttons instead of going through the inputs after they've been processed by the API and profiles. Don't know if that'll lead anywhere, but I suppose it's worth a shot. |
SDL have remapping for these buttons hardcoded (based on controller name), we probably should do the same: |
Tested versions
Reproducible in Godot v4.3.dev (b15105a)
System information
Godot v4.3.dev (b15105a) - macOS 14.3.1 - Vulkan (Forward+) - dedicated AMD Radeon Pro 5500 XT - Intel(R) Core(TM) i7-10700K CPU @ 3.80GHz (16 Threads)
Issue description
The mappings for the A, B, X, and Y buttons on the Nintendo Switch Pro Controller are off. The A and B buttons are switched, as are the X and Y buttons. I've attached a short video of my pressing the buttons on the controller and seeing what the editor picked up.
Godot.Switch.Pro.Button.Mapping.Issue.mov
Steps to reproduce
Joypad Button 0 (Bottom Action, Sony Cross, Xbox A, Nintendo B)
, despite it being the Right Action button.Joypad Button 1 (Right Action, Sony Circle, Xbox B, Nintendo A)
, despite it being the Bottom Action button.Joypad Button 2 (Left Action, Sony Square, Xbox X, Nintendo Y)
, despite it being the Top Action button.Joypad Button 3 (Top Action, Sony Triangle, Xbox Y, Nintendo X)
, despite it being the Left Action button.Minimal reproduction project (MRP)
N/A
The text was updated successfully, but these errors were encountered: