summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerEmu
diff options
context:
space:
mode:
authorAdmiral H. Curtiss <pikachu025@gmail.com>2024-05-21 22:11:42 +0200
committerGitHub <noreply@github.com>2024-05-21 22:11:42 +0200
commit321dc9b76deff1dc3053dd26d1b5f5248bbdc206 (patch)
tree6adf75fac1a5292d20210b898a3751ac72f9ea45 /Source/Core/InputCommon/ControllerEmu
parentabc8aa2237ee83c6a656a8617dec330d6fae78fe (diff)
parent47b06d274ee0f059fa420c251c0b5e07bc44cff2 (diff)
Merge pull request #12711 from jordan-woyak/modifier-range-ini-default
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(),