From 56531a0b7f76ec72da5019fef86c6ae2b3addac0 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 8 Feb 2017 23:03:37 -0500 Subject: [PATCH] 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. --- Source/Core/InputCommon/ControllerEmu/ControllerEmu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { }