From 47b06d274ee0f059fa420c251c0b5e07bc44cff2 Mon Sep 17 00:00:00 2001 From: Jordan Woyak Date: Mon, 15 Apr 2024 18:32:31 -0500 Subject: [PATCH] InputCommon: Fix unnecessary "Modifier/Range" ini file entries. --- Source/Core/InputCommon/ControllerEmu/StickGate.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Source/Core/InputCommon/ControllerEmu/StickGate.cpp b/Source/Core/InputCommon/ControllerEmu/StickGate.cpp index a476cce9ed..4cdf3b63fb 100644 --- a/Source/Core/InputCommon/ControllerEmu/StickGate.cpp +++ b/Source/Core/InputCommon/ControllerEmu/StickGate.cpp @@ -275,6 +275,14 @@ void ReshapableInput::SaveConfig(Common::IniFile::Section* section, ControlGroup::SaveConfig(section, default_device, base_name); const std::string group(base_name + name + '/'); + + // Special handling for "Modifier" button "Range" settings which default to 50% instead of 100%. + if (const auto* modifier_input = GetModifierInput()) + { + section->Set(group + modifier_input->name + "/Range", modifier_input->control_ref->range * 100, + 50.0); + } + std::vector save_data(m_calibration.size()); std::transform( m_calibration.begin(), m_calibration.end(), save_data.begin(),