1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +00:00

Revert "[3.x] Fixed event spam when using the Nintendo Switch controller"

This commit is contained in:
Marcel Admiraal
2021-12-17 17:20:43 +00:00
committed by GitHub
parent 9c04c75e7d
commit 9f250e8370

View File

@@ -811,10 +811,7 @@ void InputDefault::joy_axis(int p_device, int p_axis, const JoyAxis &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[p_axis] - p_value.value) < MIN_AXIS_CHANGE) {
if (joy.last_axis[p_axis] == p_value.value) {
return;
}