summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerEmu.cpp
diff options
context:
space:
mode:
authorPierre Bourdon <delroth@gmail.com>2014-08-24 19:58:25 +0200
committerPierre Bourdon <delroth@gmail.com>2014-08-24 19:58:25 +0200
commit9ff7125786f52b79fdd083c72cf85a45d8270ded (patch)
tree55bf8f77659ee53a7a19a7c686ece0a5d09358ee /Source/Core/InputCommon/ControllerEmu.cpp
parentebf1b981067c7f92e60178325fee40f6f54e11c1 (diff)
parent7fd5e4300a65b09ba496960746d5e76ffc802035 (diff)
Merge pull request #810 from lioncash/controller-interface
InputCommon: Don't base default radius of analog sticks off of their name
Diffstat (limited to 'Source/Core/InputCommon/ControllerEmu.cpp')
-rw-r--r--Source/Core/InputCommon/ControllerEmu.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/Source/Core/InputCommon/ControllerEmu.cpp b/Source/Core/InputCommon/ControllerEmu.cpp
index e5822a0e9e..87378f86e0 100644
--- a/Source/Core/InputCommon/ControllerEmu.cpp
+++ b/Source/Core/InputCommon/ControllerEmu.cpp
@@ -137,18 +137,14 @@ void ControllerEmu::SaveConfig(IniFile::Section *sec, const std::string& base)
ctrlGroup->SaveConfig(sec, defdev, base);
}
-ControllerEmu::AnalogStick::AnalogStick(const char* const _name) : ControlGroup(_name, GROUP_TYPE_STICK)
+ControllerEmu::AnalogStick::AnalogStick(const char* const _name, ControlState default_radius)
+ : ControlGroup(_name, GROUP_TYPE_STICK)
{
for (auto& named_direction : named_directions)
controls.emplace_back(new Input(named_direction));
controls.emplace_back(new Input(_trans("Modifier")));
-
- // Default to 100 radius for everything but gcpad.
- if (name == "Stick" || name == "Left Stick" || name == "Right Stick")
- settings.emplace_back(new Setting(_trans("Radius"), 1.0f, 0, 100));
- else
- settings.emplace_back(new Setting(_trans("Radius"), 0.7f, 0, 100));
+ settings.emplace_back(new Setting(_trans("Radius"), default_radius, 0, 100));
settings.emplace_back(new Setting(_trans("Dead Zone"), 0, 0, 50));
}