diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-12-21 09:44:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-21 09:44:59 +0100 |
commit | 5ffee633cd83a0a607c27be1664f9ac0ba244a27 (patch) | |
tree | 1f225e4f1b28a34ed5720f32d3323054d297e4f3 /core | |
parent | 78857ec7709c13a8514e5bcecb5b6b4a2785c9b6 (diff) | |
parent | 39136ce3e07507fb43c25b0ac920d8bd574401dc (diff) |
Merge pull request #56028 from madmiraal/revert-55978-fix-switch-controller-event-spam
Diffstat (limited to 'core')
-rw-r--r-- | core/input/input.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/core/input/input.cpp b/core/input/input.cpp index 9a6a2a2e15..3dfe73ab8e 100644 --- a/core/input/input.cpp +++ b/core/input/input.cpp @@ -922,10 +922,7 @@ void Input::joy_axis(int p_device, JoyAxis p_axis, const JoyAxisValue &p_value) Joypad &joy = joy_names[p_device]; - // Make sure that we don't generate events for up to 5% jitter - // This is needed for Nintendo Switch Pro controllers, which jitter at rest - const float MIN_AXIS_CHANGE = 0.05f; - if (fabs(joy.last_axis[(size_t)p_axis] - p_value.value) < MIN_AXIS_CHANGE) { + if (joy.last_axis[(size_t)p_axis] == p_value.value) { return; } |