From f07457b6ccb0ef6773b08c0e494df28a29c1b3e6 Mon Sep 17 00:00:00 2001 From: Jordan Woyak Date: Sat, 8 Feb 2020 20:36:26 -0600 Subject: InputCommon: Eliminate some duplicated button threshold logic. --- Source/Core/InputCommon/ControllerEmu/ControlGroup/Force.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Source/Core/InputCommon/ControllerEmu/ControlGroup/Force.cpp') diff --git a/Source/Core/InputCommon/ControllerEmu/ControlGroup/Force.cpp b/Source/Core/InputCommon/ControllerEmu/ControlGroup/Force.cpp index 7ddbeba335..f4bc62361a 100644 --- a/Source/Core/InputCommon/ControllerEmu/ControlGroup/Force.cpp +++ b/Source/Core/InputCommon/ControllerEmu/ControlGroup/Force.cpp @@ -67,8 +67,8 @@ Force::Force(const std::string& name_) : ReshapableInput(name_, name_, GroupType Force::ReshapeData Force::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) @@ -80,7 +80,7 @@ Force::ReshapeData Force::GetReshapableState(bool adjusted) Force::StateData Force::GetState(bool adjusted) { const auto state = GetReshapableState(adjusted); - ControlState z = controls[4]->control_ref->State() - controls[5]->control_ref->State(); + ControlState z = controls[4]->GetState() - controls[5]->GetState(); if (adjusted) { @@ -159,9 +159,9 @@ Shake::Shake(const std::string& name_, ControlState default_intensity_scale) Shake::StateData Shake::GetState(bool adjusted) const { - const float x = controls[0]->control_ref->State(); - const float y = controls[1]->control_ref->State(); - const float z = controls[2]->control_ref->State(); + const float x = controls[0]->GetState(); + const float y = controls[1]->GetState(); + const float z = controls[2]->GetState(); StateData result = {x, y, z}; -- cgit v1.2.3