Copy over right stick Y axis sensitivity in the UI when the X sensitivity is changed.

This commit is contained in:
Kenix3 2022-08-11 00:25:49 -04:00
parent 4a3e43f73f
commit d623ac5918

View File

@ -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__