summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerEmu
diff options
context:
space:
mode:
authorJordan Woyak <jordan.woyak@gmail.com>2024-04-15 18:32:31 -0500
committerJordan Woyak <jordan.woyak@gmail.com>2024-04-15 18:32:31 -0500
commit47b06d274ee0f059fa420c251c0b5e07bc44cff2 (patch)
treec240f57f047a10668055afee5ce1579c6e5ad883 /Source/Core/InputCommon/ControllerEmu
parentdbc7e035773d97293f572b9fe15fdcb877fc3965 (diff)
InputCommon: Fix unnecessary "Modifier/Range" ini file entries.
Diffstat (limited to 'Source/Core/InputCommon/ControllerEmu')
-rw-r--r--Source/Core/InputCommon/ControllerEmu/StickGate.cpp8
1 files changed, 8 insertions, 0 deletions
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<std::string> save_data(m_calibration.size());
std::transform(
m_calibration.begin(), m_calibration.end(), save_data.begin(),