From 39136ce3e07507fb43c25b0ac920d8bd574401dc Mon Sep 17 00:00:00 2001 From: Marcel Admiraal Date: Fri, 17 Dec 2021 17:14:07 +0000 Subject: [PATCH] Revert "Fixed event spam when using the Nintendo Switch controller" --- core/input/input.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/core/input/input.cpp b/core/input/input.cpp index 9a6a2a2e158..3dfe73ab8ea 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; }