summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerEmu/StickGate.cpp
diff options
context:
space:
mode:
authorJMC47 <JMC4789@gmail.com>2019-04-13 12:13:13 -0400
committerGitHub <noreply@github.com>2019-04-13 12:13:13 -0400
commita891115ea350528f1735dab54d05edc8b8fe77c6 (patch)
tree08257dd14877d4693d502dcf50e81a734e0cb043 /Source/Core/InputCommon/ControllerEmu/StickGate.cpp
parent241166a1a5becb0a6a2af209e7f5ea2962d6a2dd (diff)
parentc89ddf8cba9c6b19d59e2db1896292797163c54c (diff)
Merge pull request #7952 from jordan-woyak/emu-shake-params
WiimoteEmu: Allow shake frequency and intensity to be configured.
Diffstat (limited to 'Source/Core/InputCommon/ControllerEmu/StickGate.cpp')
-rw-r--r--Source/Core/InputCommon/ControllerEmu/StickGate.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/Source/Core/InputCommon/ControllerEmu/StickGate.cpp b/Source/Core/InputCommon/ControllerEmu/StickGate.cpp
index 8e9d48467a..48c21ae5be 100644
--- a/Source/Core/InputCommon/ControllerEmu/StickGate.cpp
+++ b/Source/Core/InputCommon/ControllerEmu/StickGate.cpp
@@ -272,8 +272,7 @@ ReshapableInput::ReshapeData ReshapableInput::Reshape(ControlState x, ControlSta
}
// Apply deadzone as a percentage of the user-defined calibration shape/size:
- const ControlState deadzone = GetDeadzonePercentage();
- dist = std::max(0.0, dist - deadzone) / (1.0 - deadzone);
+ dist = ApplyDeadzone(dist, GetDeadzonePercentage());
// Scale to the gate shape/radius:
dist *= gate_max_dist;