diff options
| author | JMC47 <JMC4789@gmail.com> | 2019-04-13 12:13:13 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-04-13 12:13:13 -0400 |
| commit | a891115ea350528f1735dab54d05edc8b8fe77c6 (patch) | |
| tree | 08257dd14877d4693d502dcf50e81a734e0cb043 /Source/Core/InputCommon/ControllerEmu/StickGate.cpp | |
| parent | 241166a1a5becb0a6a2af209e7f5ea2962d6a2dd (diff) | |
| parent | c89ddf8cba9c6b19d59e2db1896292797163c54c (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.cpp | 3 |
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; |
