diff options
| author | Joshua Vandaƫle <joshua@vandaele.software> | 2026-08-28 07:37:18 +0200 |
|---|---|---|
| committer | Joshua Vandaƫle <joshua@vandaele.software> | 2026-08-28 07:37:18 +0200 |
| commit | b572e4ca5a74481fad0bd14e4c5f9719945d61d8 (patch) | |
| tree | 8ff6a79ea03b11b94e2b3eeaac06cbcc358f58d8 /Source/Core/InputCommon/ControllerInterface/SDL/SDLGamepad.cpp | |
| parent | 4f8af23db516d8b6e9cd00e7b261a65b026514a8 (diff) | |
SDLGamepad: Add Misc 2 through 6
SDL 3 has more misc buttons for "additional controller buttons" (e.g. left/right trigger clicks on a GameCube controller, or for the second touchpad click on the Steam Controller) which use these additional named Misc buttons. Taken from [SDL_GamepadButton](https://wiki.libsdl.org/SDL3/SDL_GamepadButton)
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/SDL/SDLGamepad.cpp')
| -rw-r--r-- | Source/Core/InputCommon/ControllerInterface/SDL/SDLGamepad.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/SDL/SDLGamepad.cpp b/Source/Core/InputCommon/ControllerInterface/SDL/SDLGamepad.cpp index 09457598c6..6fcba14e8e 100644 --- a/Source/Core/InputCommon/ControllerInterface/SDL/SDLGamepad.cpp +++ b/Source/Core/InputCommon/ControllerInterface/SDL/SDLGamepad.cpp @@ -327,6 +327,9 @@ bool Gamepad::Button::IsMatchingName(std::string_view name) const return true; // Match the old "Button 0"-like names. + if (m_binding.output_type == SDL_GAMEPAD_BINDTYPE_BUTTON) + return name == GetLegacyButtonName(m_binding.output.button); + switch (m_binding.input_type) { case SDL_GAMEPAD_BINDTYPE_BUTTON: |
