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

Swap Nintendo face buttons on macOS #103661

Merged
merged 1 commit into from
Mar 6, 2025
Merged

Conversation

Grublady
Copy link
Contributor

@Grublady Grublady commented Mar 5, 2025

Essentially an update of #89001, as the code that PR is built upon was replaced in #94580.
Fixes #88693.

@Calinou Calinou added bug platform:macos topic:porting cherrypick:4.4 Considered for cherry-picking into a future 4.4.x release labels Mar 6, 2025
@Calinou Calinou added this to the 4.5 milestone Mar 6, 2025
Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally on macOS 15.2 with a wired Switch Pro controller, it works as expected.

In the joypads demo, pressing A/B used to highlight the opposite button instead (same for X/Y).

Now it highlights the correct location, although the button label appearing on the diagram is wrong since the diagram is designed with Xbox controllers in mind.

@akien-mga akien-mga requested a review from bruvzg March 6, 2025 17:20
Copy link
Member

@bruvzg bruvzg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks fine. I do not have any Switch controllers to test it.

@Meorge
Copy link
Contributor

Meorge commented Mar 6, 2025

I should be able to test it shortly!

Edit: Works with

  • Pro Controller, wired
  • Pro Controller, wireless
  • Joy-Cons (L/R) when both connected

It does not work fully with an individual Joy-Con (L) or Joy-Con (R). When held horizontally, the left, up, and right buttons do not register in Godot; the down button registers as "Nintendo Y" (Joypad Button 2).

@Grublady
Copy link
Contributor Author

Grublady commented Mar 6, 2025

It does not work fully with an individual Joy-Con (L) or Joy-Con (R). When held horizontally, the left, up, and right buttons do not register in Godot; the down button registers as "Nintendo Y" (Joypad Button 2).

This happens for me as well, both before and after these changes. It seems to be a result of moving to the Game Controller framework so I'm not sure if there's a way to work around it. In any case it should be orthogonal to this PR.

@Repiteo Repiteo merged commit 178566a into godotengine:master Mar 6, 2025
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Mar 6, 2025

Thanks!

@Grublady Grublady deleted the nin_abxy branch March 6, 2025 23:13
@akien-mga
Copy link
Member

Cherry-picked for 4.4.1.

@akien-mga akien-mga removed the cherrypick:4.4 Considered for cherry-picking into a future 4.4.x release label Mar 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ABXY button mapping incorrect for Nintendo Switch Pro Controller
6 participants