From a56fc57a8344c2bcf43b6e8aea94c018f29de762 Mon Sep 17 00:00:00 2001 From: Megamouse Date: Thu, 9 Feb 2023 00:01:56 +0100 Subject: [PATCH] evdev: allow more buttons on sony guitar --- rpcs3/Input/evdev_joystick_handler.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rpcs3/Input/evdev_joystick_handler.cpp b/rpcs3/Input/evdev_joystick_handler.cpp index 7a0d7d1091..65a56d247b 100644 --- a/rpcs3/Input/evdev_joystick_handler.cpp +++ b/rpcs3/Input/evdev_joystick_handler.cpp @@ -368,6 +368,7 @@ PadHandlerBase::connection evdev_joystick_handler::get_next_button_press(const s const bool is_xbox_360_controller = padId.find("Xbox 360") != umax; const bool is_sony_controller = !is_xbox_360_controller && padId.find("Sony") != umax; + const bool is_sony_guitar = is_sony_controller && padId.find("Guitar") != umax; for (const auto& [code, name] : button_list) { @@ -376,7 +377,7 @@ PadHandlerBase::connection evdev_joystick_handler::get_next_button_press(const s continue; if (is_xbox_360_controller && code >= BTN_TRIGGER_HAPPY) continue; - if (is_sony_controller && (code == BTN_TL2 || code == BTN_TR2)) + if (is_sony_controller && !is_sony_guitar && (code == BTN_TL2 || code == BTN_TR2)) continue; if (!get_blacklist && std::find(m_blacklist.begin(), m_blacklist.end(), name) != m_blacklist.end())