summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerEmu/ControlGroup/AnalogStick.cpp
diff options
context:
space:
mode:
authorJordan Woyak <jordan.woyak@gmail.com>2020-02-08 20:36:26 -0600
committerJordan Woyak <jordan.woyak@gmail.com>2020-02-09 10:37:18 -0600
commitf07457b6ccb0ef6773b08c0e494df28a29c1b3e6 (patch)
tree32ed2c99fdee98a021c051c2ef68c97c75e0f311 /Source/Core/InputCommon/ControllerEmu/ControlGroup/AnalogStick.cpp
parent2e2540317e8752b8fe2e4d549a0b5c1ab1911041 (diff)
InputCommon: Eliminate some duplicated button threshold logic.
Diffstat (limited to 'Source/Core/InputCommon/ControllerEmu/ControlGroup/AnalogStick.cpp')
-rw-r--r--Source/Core/InputCommon/ControllerEmu/ControlGroup/AnalogStick.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/Core/InputCommon/ControllerEmu/ControlGroup/AnalogStick.cpp b/Source/Core/InputCommon/ControllerEmu/ControlGroup/AnalogStick.cpp
index 45d178ed17..df67930f9d 100644
--- a/Source/Core/InputCommon/ControllerEmu/ControlGroup/AnalogStick.cpp
+++ b/Source/Core/InputCommon/ControllerEmu/ControlGroup/AnalogStick.cpp
@@ -34,14 +34,14 @@ AnalogStick::AnalogStick(const char* const name_, const char* const ui_name_,
AnalogStick::ReshapeData AnalogStick::GetReshapableState(bool adjusted)
{
- const ControlState y = controls[0]->control_ref->State() - controls[1]->control_ref->State();
- const ControlState x = controls[3]->control_ref->State() - controls[2]->control_ref->State();
+ const ControlState y = controls[0]->GetState() - controls[1]->GetState();
+ const ControlState x = controls[3]->GetState() - controls[2]->GetState();
// Return raw values. (used in UI)
if (!adjusted)
return {x, y};
- const ControlState modifier = controls[4]->control_ref->State();
+ const ControlState modifier = controls[4]->GetState();
return Reshape(x, y, modifier);
}