From d623ac59188d85defa49876fabfe1f8ace319a73 Mon Sep 17 00:00:00 2001 From: Kenix3 Date: Thu, 11 Aug 2022 00:25:49 -0400 Subject: [PATCH] Copy over right stick Y axis sensitivity in the UI when the X sensitivity is changed. --- libultraship/libultraship/InputEditor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libultraship/libultraship/InputEditor.cpp b/libultraship/libultraship/InputEditor.cpp index 79916bf92..b557f3cc4 100644 --- a/libultraship/libultraship/InputEditor.cpp +++ b/libultraship/libultraship/InputEditor.cpp @@ -172,7 +172,7 @@ namespace Ship { ImGui::SetCursorPosX(ImGui::GetCursorPosX() + 8); // 2 is the SDL value for right stick X axis // 3 is the SDL value for right stick Y axis. - DrawVirtualStick("##CameraVirtualStick", ImVec2(Backend->getRightStickX(CurrentPort) / profile->AxisSensitivities[2], Backend->getRightStickY(CurrentPort) / profile->AxisSensitivities[3])); + DrawVirtualStick("##CameraVirtualStick", ImVec2(Backend->getRightStickX(CurrentPort) / profile->AxisSensitivities[2], Backend->getRightStickY(CurrentPort) / profile->AxisSensitivities[2])); ImGui::SameLine(); ImGui::SetCursorPosX(ImGui::GetCursorPosX() + 5); @@ -184,6 +184,7 @@ namespace Ship { ImGui::Text("Sensitivity"); ImGui::PushItemWidth(80); ImGui::InputFloat("##MSensitivity", &profile->AxisSensitivities[2] /* This is the SDL value for right stick X axis */, 1.0f, 0.0f, "%.0f"); + profile->AxisSensitivities[3] = profile->AxisSensitivities[2]; ImGui::PopItemWidth(); ImGui::EndChild(); #ifdef __SWITCH__