summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerEmu/ControlGroup/AnalogStick.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/InputCommon/ControllerEmu/ControlGroup/AnalogStick.cpp')
-rw-r--r--Source/Core/InputCommon/ControllerEmu/ControlGroup/AnalogStick.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/Source/Core/InputCommon/ControllerEmu/ControlGroup/AnalogStick.cpp b/Source/Core/InputCommon/ControllerEmu/ControlGroup/AnalogStick.cpp
index b4b1accc77..aaabfa5b17 100644
--- a/Source/Core/InputCommon/ControllerEmu/ControlGroup/AnalogStick.cpp
+++ b/Source/Core/InputCommon/ControllerEmu/ControlGroup/AnalogStick.cpp
@@ -40,9 +40,7 @@ AnalogStick::ReshapeData AnalogStick::GetReshapableState(bool adjusted) const
if (!adjusted)
return {x, y};
- const ControlState modifier = controls[4]->GetState();
-
- return Reshape(x, y, modifier);
+ return Reshape(x, y, GetModifierInput()->GetState());
}
AnalogStick::StateData AnalogStick::GetState() const
@@ -55,6 +53,11 @@ ControlState AnalogStick::GetGateRadiusAtAngle(double ang) const
return m_stick_gate->GetRadiusAtAngle(ang);
}
+Control* AnalogStick::GetModifierInput() const
+{
+ return controls[4].get();
+}
+
OctagonAnalogStick::OctagonAnalogStick(const char* name_, ControlState gate_radius)
: OctagonAnalogStick(name_, name_, gate_radius)
{