summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerEmu/ControllerEmu.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2017-02-08 23:03:37 -0500
committerLioncash <mathew1800@gmail.com>2017-02-08 23:08:13 -0500
commit56531a0b7f76ec72da5019fef86c6ae2b3addac0 (patch)
tree1988513f7a0b2e86b3c3060ffbe921a46e1c1684 /Source/Core/InputCommon/ControllerEmu/ControllerEmu.cpp
parent73382852b7636642d6614d7b7919ee6173dfe71f (diff)
ControllerEmu: Fix incorrect default radius being set in AnalogStick
The three parameter AnalogStick constructor takes an internal name, a display name, and a default radius argument. The delegated constructor is the one that calls the ControlGroup constructor, setting the group type, so passing the group type here is a logic bug. The only reason this appeared to work despite this bug is because GROUP_TYPE_STICK has a value of 1, and the default radius value used for attachment sticks is 1.0.
Diffstat (limited to 'Source/Core/InputCommon/ControllerEmu/ControllerEmu.cpp')
-rw-r--r--Source/Core/InputCommon/ControllerEmu/ControllerEmu.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Core/InputCommon/ControllerEmu/ControllerEmu.cpp b/Source/Core/InputCommon/ControllerEmu/ControllerEmu.cpp
index 4421353aa6..62501494e6 100644
--- a/Source/Core/InputCommon/ControllerEmu/ControllerEmu.cpp
+++ b/Source/Core/InputCommon/ControllerEmu/ControllerEmu.cpp
@@ -172,7 +172,7 @@ void ControllerEmu::ControlGroup::SetControlExpression(int index, const std::str
}
ControllerEmu::AnalogStick::AnalogStick(const char* const _name, ControlState default_radius)
- : AnalogStick(_name, _name, GROUP_TYPE_STICK)
+ : AnalogStick(_name, _name, default_radius)
{
}