From c89ddf8cba9c6b19d59e2db1896292797163c54c Mon Sep 17 00:00:00 2001 From: Jordan Woyak Date: Fri, 29 Mar 2019 14:39:48 -0500 Subject: WiimoteEmu: Allow shake frequency and intensity to be configured. Other minor cleanups. --- Source/Core/InputCommon/ControllerEmu/StickGate.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Source/Core/InputCommon/ControllerEmu/StickGate.cpp') 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; -- cgit v1.2.3