From 56d14b55481b2f491d30fafeb3a2b91df5af71a1 Mon Sep 17 00:00:00 2001 From: Malkierian Date: Tue, 6 May 2025 09:00:28 -0700 Subject: [PATCH] Resolve type conversion warnings in InputViewer.cpp. --- soh/soh/Enhancements/controls/InputViewer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/soh/soh/Enhancements/controls/InputViewer.cpp b/soh/soh/Enhancements/controls/InputViewer.cpp index 1d6695d25..5df02f5da 100644 --- a/soh/soh/Enhancements/controls/InputViewer.cpp +++ b/soh/soh/Enhancements/controls/InputViewer.cpp @@ -345,7 +345,7 @@ void InputViewer::DrawElement() { // Analog Stick const int analogOutlineMode = CVarGetInteger(CVAR_INPUT_VIEWER("AnalogStick.OutlineMode"), STICK_MODE_ALWAYS_SHOWN); - const float maxStickDistance = CVarGetInteger(CVAR_INPUT_VIEWER("AnalogStick.Movement"), 12); + const int32_t maxStickDistance = CVarGetInteger(CVAR_INPUT_VIEWER("AnalogStick.Movement"), 12); if (analogOutlineMode == STICK_MODE_ALWAYS_SHOWN || (analogOutlineMode == STICK_MODE_HIDDEN_IN_DEADZONE && !analogStickIsInDeadzone)) { ImGui::SetNextItemAllowOverlap(); @@ -367,7 +367,7 @@ void InputViewer::DrawElement() { } // Right Stick - const float maxRightStickDistance = CVarGetInteger(CVAR_INPUT_VIEWER("RightStick.Movement"), 7); + const int32_t maxRightStickDistance = CVarGetInteger(CVAR_INPUT_VIEWER("RightStick.Movement"), 7); const int rightOutlineMode = CVarGetInteger(CVAR_INPUT_VIEWER("RightStick.OutlineMode"), STICK_MODE_ALWAYS_HIDDEN); if (rightOutlineMode == STICK_MODE_ALWAYS_SHOWN || @@ -401,7 +401,7 @@ void InputViewer::DrawElement() { ImGui::PushFont(ImGui::GetFont()); // Calculate polar R coordinate from X and Y angles, squared to avoid sqrt - const float rSquared = pads[0].stick_x * pads[0].stick_x + pads[0].stick_y * pads[0].stick_y; + const int32_t rSquared = pads[0].stick_x * pads[0].stick_x + pads[0].stick_y * pads[0].stick_y; // ESS range const int range1Min = CVarGetInteger(CVAR_INPUT_VIEWER("AnalogAngles.Range1.Min"), 8);