Uses Positional Face Button Layout instead of Button Labels#627
Uses Positional Face Button Layout instead of Button Labels#627AL2009man wants to merge 10 commits intofgsfdsfgs:portfrom
Conversation
this SDL Hint will disable `SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS`. allowing all Controllers to use the positional layout (SDL3-style) as opposed to Button Labels. This addresses a specific problem with Nintendo Switch controllers where the Face Buttons are assigned in a literal Button Symbol position, causes muscle memory issues while maintaining consistency across all modern controllers. for those who...somehow, prefer the prior setup: you can restore it by either rebinding it from Key Binding (per controller) or set `useNintendoLayout` to 1 (global, affects all Controllers).
this will be moved to a separate PR (fgsfdsfgs#627).
To compensate for Positional Layout change: the `n64joybinds` for `CK_A` and `CK_B` are reversed by default, if the user happens to use a third-party N64 Controller with PC Support: this should avoid less friction
This reverts commit 42667bd.
* added gitignore * fixed Button Layout for Nitntendo Controllers `SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS` will follow the Button Labels, which causes issues in games that uses it. This commit will turn it off by default, but the default can be restored via `useNintendoLayout` within pd.ini file * fixed Face button layout for Nintendo Switch, Japanese face button layout `SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS` is set to 0, which will follow the positional diamond-shaped face buttons on the game controller. making everything more streamlined and easier to translate across all modern contorllers. This solves a specific issue with Japanese-style face buttons for `BUTTON_UI_ACCEPT`/`BUTTON_UI_CANCEL` actions has been added. A bit of a hacky workaround, but it'll do for now. By default: it'll only kicks in when using a Nintendo Switch controller, but `JapaneseButtonLayout` is accessible within `pd.ini` * remove "/vscode" from .gitignore leftovers due to switching to Visual Studios code * updated documentation for the new button layout * changed title from `inputIsSwitchController` to `inputIsNintendoSwitchController` * putting guardrails for GitHub Action CI * added UI Menu text to reflect the Japanese layout when going to the Keybind page, you'd see "[JPN LAYOUT - B/A]" on UI Accept/Cancel text, UI Text will change dynamically. * another attempt to fix build-i686-linux * replaced Action-based swaps with hardcoded button inputs when using Japanese layout also changed the guard function for GitHubAction CI * ditched hardcoded button inputs for the time being reverted back to the game action-based setup for the time being. this might be revised when a separate PR changes the Button Input labels. (make it easier to troubleshoot * updated default Joystick deadzone to 6500 / 6 to better accout for uncalibrated joysticks: the default joystick slider will be increasing to 6 percent. This should address a specific issue for first-party Nintendo Switch Pro Controller users who can't calibrate their joystick drifts. * removed NintendoLayout for the time being this will be moved to a separate PR (fgsfdsfgs#627). * Restored original default deadzone to prepare for future SDL2 release libsdl-org/SDL#13260 addresses this particular issue for Nintendo Switch Pro Controller's center deadzone, this: the original default deadzone has been restored to 4 percent and 6 percent * Adjustments Japanese Layout input handling Cleaned up and fixed the remaining bugs within the input system. Options Menu's Bind UI should now correctly reflect the Japanese Layout * attempt fix regression for i686-linux * restored previous workaround for GitHub Action compiling * replaced SDL Buttons with CK_BUTTON's * removed Getter and Setter for Japanese Layout for now temporarily removed Get and Set functions, as it's leftover code for a pending Menu UI toggle.. * Simplified Japanese Layout setup To better prepare for `SDL_GetGamepadButtonLabel`/SDL3: the entire setup has been simplified by combining `inputIsJapaneseLayoutActive` and `inputRemapUIButton` into one, while giving it a new name * attempt whitespace fix * code cleanup * fixed `SDL_VERSIONATLEAST number double-checked SDL2 version to addrsss incorrect build release`
|
I'd argue |
You sure? This will become a problem when you guys start migrating to SDL3, which will deprecate You'll have to create a entirely new Face Button swap detection mechanism if you really wanna ensure Nintendo Switch controller users maintain the same config setup as before. edit: I can plan on making the NintendoLayout as the default and change #625 to follow |
|
Well, my point is, if I take this PR by itself and merge it, by default it should work like it did before this PR, because updating and suddenly getting your accept/cancel buttons swapped is probably a bit jarring. And from your comments in the code it seems like |
To better reflect `SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS`: the name has been changed. that also means the order of which has been swapped out.
|
The way how I have written the notes is based upon SDL_Hints documents. Those who might be reading the code may not be familiar to those who haven't dabbled with SDL before. I'll go ahead and update the name and description to better clarity. (won't be pushed over to this PR until i get a response) that means:
if if said toggle is set to as for Accept/Cancel stuffs (#693): don't worry, I already have a plan. If you want ultimately, @fgsfdsfgs: you got three choices, all three choice will ultimately lead you to a "illusion of choice":
|
|
One thing that's for sure is that we'll worry about the SDL3 migration when we get there. I'm still waiting on the Switch port to stabilize, so it'll probably take a while. If this only applies to some controllers, then we can probably merge this as-is. |
noticed some whitespace, and commit sync error, will have to fix and push
to prepare for fgsfdsfgs#627, this commit added Accept/Cancel Swap for Menu Navigation. This function only applies when using a Nintendo Switch controller, but it can be forcefully enabled for all Controller Types within `pd.ini`'s `swapAcceptCancelButtons`
To prepare for fgsfdsfgs#627, this commit added Accept/Cancel Swap for Menu Navigation. This function only applies when using a Nintendo Switch controller, but it can be forcefully enabled for all Controller Types within `pd.ini`'s `swapAcceptCancelButtons`

this SDL Hint will disable
SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS. allowing all Controllers to use the positional layout (SDL3-style) as opposed to Button Labels. refer to #693 for more infoThis addresses a specific problem with Nintendo Switch controllers where the Face Buttons are assigned in a literal Button Symbol position, causes muscle memory issues while maintaining consistency across all modern controllers.
for those who...somehow, prefer the prior setup: you can restore it by either rebinding it from Key Binding (per controller) or set
useNintendoLayoutto 1 (global, affects all Controllers).