From ab496ef8fe6ff9cfc5292840d14e13bc0a35bf8d Mon Sep 17 00:00:00 2001 From: Albert Liu <45282415+ggrtk@users.noreply.github.com> Date: Sun, 7 Nov 2021 11:50:05 -0800 Subject: [PATCH] AnalogController: Don't re-enable legacy rumble on manual toggles --- src/core/analog_controller.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/analog_controller.cpp b/src/core/analog_controller.cpp index 5da66129e..caa35db67 100644 --- a/src/core/analog_controller.cpp +++ b/src/core/analog_controller.cpp @@ -259,9 +259,6 @@ void AnalogController::ProcessAnalogModeToggle() else { SetAnalogMode(!m_analog_mode); - - // Manually toggling controller mode resets and disables rumble configuration - m_rumble_unlocked = false; ResetRumbleConfig(); // TODO: Mode switch detection (0x00 returned on certain commands instead of 0x5A) @@ -567,8 +564,11 @@ bool AnalogController::Transfer(const u8 data_in, u8* data_out) if (m_command_step == (static_cast(m_response_length) - 1)) { - m_rumble_unlocked = true; m_configuration_mode = (m_rx_buffer[2] == 1); + + if (m_configuration_mode) + m_rumble_unlocked = true; + Log_DevPrintf("0x%02x(%s) config mode", m_rx_buffer[2], m_configuration_mode ? "enter" : "leave"); } }