From 009e474c51b764a08da8d8173adab381a102c0d5 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Fri, 5 Jun 2020 22:32:51 +1000 Subject: [PATCH] AnalogController: Fix inverted motor binding --- src/core/analog_controller.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/analog_controller.cpp b/src/core/analog_controller.cpp index 808f7906f..93d0b66cf 100644 --- a/src/core/analog_controller.cpp +++ b/src/core/analog_controller.cpp @@ -254,7 +254,7 @@ bool AnalogController::Transfer(const u8 data_in, u8* data_out) case State::GetStateButtonsLSB: { if (m_rumble_unlocked) - SetMotorState(0, data_in); + SetMotorState(1, data_in != 0 ? 255 : 0); *data_out = Truncate8(m_button_state); m_state = State::GetStateButtonsMSB; @@ -265,7 +265,7 @@ bool AnalogController::Transfer(const u8 data_in, u8* data_out) case State::GetStateButtonsMSB: { if (m_rumble_unlocked) - SetMotorState(1, data_in); + SetMotorState(0, data_in); *data_out = Truncate8(m_button_state >> 8); m_state = m_analog_mode ? State::GetStateRightAxisX : State::Idle;