Steam now uses SDL for Nintendo controller support and as-such, respects that hint. When Steam launches a game, it will set that hint based on the "Use Nintendo Button Layout" setting. I recommend that you don't launch Steam with that environment variable set, and Steam will work correctly, and Steam games will work corrrectly, based on the setting in the UI.
The environment variable on my end is set through .bashrc, it's not exactly convenient to unset it every time I want to launch Steam.
Also, I still want it even if I'm not using Steam input.
When Steam launches a game, it will set that hint based on the "Use Nintendo Button Layout" setting
However, the environment variable still affects the final output, like this:
SDL_GAMECONTROLLER_USE_BUTTON_LABELS=0 |
SDL_GAMECONTROLLER_USE_BUTTON_LABELS=1 |
|
|---|---|---|
| "Use Nintendo Button Layout" On | Xbox | Nintendo |
| "Use Nintendo Button Layout" Off | Nintendo | Xbox |
Yes, the environment variable will invert the buttons that Steam sees. You should not set the environment variable for Steam. It's respected for people who need to invert it because the controller is mis-detected for some reason.
This wasn't the behavior before, though (and still isn't on Steam Stable).
Informing that this issue is now also on stable.
It's respected for people who need to invert it because the controller is mis-detected for some reason.
I still don't get what you mean by that.
First, Steam offers the option even for non-Nintendo controllers.
Second, let's assume that it doesn't, and Steam recognizes a Nintendo controller as a non-Nintendo controller. A user however wants the mapping to be Nintendo's. The solution would be to set SDL_GAMECONTROLLER_USE_BUTTON_LABELS=0 (see table above). That's the opposite of what would make sense.
Could this get reopened?
Note: this is actually fixed now.
SDL_GAMECONTROLLER_USE_BUTTON_LABELS=0`x2 2023-07SDL_GAMECONTROLLER_USE_BUTTON_LABELS=1`x1 2023-06SDL_GAMECONTROLLER_USE_BUTTON_LABELSx1 2023-06SDL_GAMECONTROLLER_USE_BUTTON_LABELS=0`,x1 2023-06
Your system information
Please describe your issue in as much detail as possible:
Nintendo controllers are known for having the A/B and X/Y buttons swapped, compared to the PC standard.
Does the user want the mapping based on the button labels, or based on the button position?
Steam has an option named "Use Nintendo Button Layout" to control that.
SDL also has a way to control that, the environment variable
SDL_GAMECONTROLLER_USE_BUTTON_LABELS(set to1by default).Because these two are doing the same thing, Steam ignored the SDL environment variable in order to give priority to its option. Because I want the mapping based on position everywhere, I disabled both Steam's "Use Nintendo Button Layout" and SDL's
SDL_GAMECONTROLLER_USE_BUTTON_LABELS.However, Steam doesn't ignore it anymore: it behaves with the assumption that
SDL_GAMECONTROLLER_USE_BUTTON_LABELSis set to1. If it is set to0then Steam's "Use Nintendo Button Layout" behavior will be reversed, meaning that now I have to enable it to get the mapping I want (which isn't intuitive).Steps for reproducing this issue:
SDL_GAMECONTROLLER_USE_BUTTON_LABELS=0, and launch Steam