summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface/SDL/SDLGamepad.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/SDL/SDLGamepad.cpp')
-rw-r--r--Source/Core/InputCommon/ControllerInterface/SDL/SDLGamepad.cpp3
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 682e24c28a..babe433fc1 100644
--- a/Source/Core/InputCommon/ControllerInterface/SDL/SDLGamepad.cpp
+++ b/Source/Core/InputCommon/ControllerInterface/SDL/SDLGamepad.cpp
@@ -333,6 +333,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: