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

Face Button layout are reversed when using Nintendo Switch Controller #488

Open
AL2009man opened this issue Mar 2, 2025 · 3 comments
Open

Comments

@AL2009man
Copy link

AL2009man commented Mar 2, 2025

Just tested Nintendo Switch Controller support. aside of using Xbox prompts (fair enough), it still works as intended (thanks, SDL's Controller API), but it has a inconsistency problem when it comes to muscle memory.

     (Y)              (X)
  (X)   (B)        (Y)   (A)
     (A)              (B)

  Standard         Nintendo

As the Nintendo's Face Button is reversed (BAYX), the gameplay portion's controls scheme will follow it, literally in a sense. Normally, the solution would be to setup a cvar to do the confirm & cancel portion only for the Menus if using a Nintendo Controller, using yquake2/yquake2@9e07dc2 as inspiration...

However: given the QTE portions and Reaction Plates/Jump Selectors, this might be a problem in terms of maintaining consistency when switching between Controller Types on the fly. I think the best way is to either do a band-aid solution or, wait until a proper Action Remapping system gets added in.

@AL2009man AL2009man changed the title Face Button is reversed when using Nintendo Switch Controller Face Button layout are reversed when using Nintendo Switch Controller Mar 2, 2025
@AL2009man AL2009man changed the title Face Button layout are reversed when using Nintendo Switch Controller [Bug] Face Button layout are reversed when using Nintendo Switch Controller Mar 2, 2025
@PhilipS02
Copy link

Yea, I can second this. It would be nice if there would be a makeshift option to "reverse" xy/ab button inputs for anyone who needs it

@hyperbx hyperbx changed the title [Bug] Face Button layout are reversed when using Nintendo Switch Controller Face Button layout are reversed when using Nintendo Switch Controller Mar 3, 2025
@Daniakec
Copy link

Daniakec commented Mar 3, 2025

Yeah this throws me off so much while playing with my switch controller. An option to "reverse" the buttons like the user above me sid would be really really nice

@AL2009man
Copy link
Author

AL2009man commented Mar 4, 2025

I managed to find a workaround to this specific problem. Using a different workaround from Quake 2 Remaster as a basis.

you'll need to use set SDL_GAMECONTROLLER_USE_BUTTON_LABELS to 0 and set the environmental value there. This will forcefully turn off the Button labels completely when using a Nintendo Controller.

If you're on Windows: you'll need to create a bat file, just open up the Notepad, put the following:

@echo off
set SDL_GAMECONTROLLER_USE_BUTTON_LABELS=0
start "" "C:\Path\to\UnleashedRecomp.exe"

Then: you'll need to press "Save As" and change "Save as Type" to "All", and type [insert name here].bat

now: you must click that bat file you created and now Sonic Unleashed uses the Xbox layout. If you plan to play using Nintendo Switch controller: you must run it with that bat file all the time.

Looking at UnleashedRecomp/hid/driver/sdl_hid.cpp file, it's clear that this hint is not added in for some reason. For now: this is a simple band-aid fix.

Edit: will be testing a way to initialized the code without needing the bat method. This commit has not been tested yet due to compiling issues in my end. https://github.com/AL2009man/UnleashedRecomp/tree/Nintendo-Layout-tempt-fix

@DeaTh-G DeaTh-G marked this as a duplicate of #1020 Mar 5, 2025
@DeaTh-G DeaTh-G marked this as a duplicate of #1052 Mar 5, 2025
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

3 participants