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/ControlGroup/Cursor.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/ControlGroup/Cursor.cpp')
| -rw-r--r-- | Source/Core/InputCommon/ControllerEmu/ControlGroup/Cursor.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Source/Core/InputCommon/ControllerEmu/ControlGroup/Cursor.cpp b/Source/Core/InputCommon/ControllerEmu/ControlGroup/Cursor.cpp index f4123154d0..5818f35d87 100644 --- a/Source/Core/InputCommon/ControllerEmu/ControlGroup/Cursor.cpp +++ b/Source/Core/InputCommon/ControllerEmu/ControlGroup/Cursor.cpp @@ -104,8 +104,7 @@ Cursor::StateData Cursor::GetState(const bool adjusted) const double max_z_step = STEP_Z_PER_SEC / 1000.0 * ms_since_update; // Apply deadzone to z: - const ControlState deadzone = GetDeadzonePercentage(); - z = std::copysign(std::max(0.0, std::abs(z) - deadzone) / (1.0 - deadzone), z); + z = ApplyDeadzone(z, GetDeadzonePercentage()); // Smooth out z movement: // FYI: Not using relative input for Z. |
