From 7a4a84a5619754b8170737726a14b368e8cbc5bf Mon Sep 17 00:00:00 2001 From: Asdqwe Date: Tue, 22 Oct 2024 19:59:50 -0300 Subject: [PATCH] [rcore] Fix #4405 (#4420) * Fix #4405 at runtime * Add parameter validation * Remove default global deadzone --- src/rcore.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/rcore.c b/src/rcore.c index a1771d18ed92..9734972cf4da 100644 --- a/src/rcore.c +++ b/src/rcore.c @@ -3295,8 +3295,7 @@ float GetGamepadAxisMovement(int gamepad, int axis) if ((gamepad < MAX_GAMEPADS) && CORE.Input.Gamepad.ready[gamepad] && (axis < MAX_GAMEPAD_AXIS)) { float movement = value < 0.0f ? CORE.Input.Gamepad.axisState[gamepad][axis] : fabsf(CORE.Input.Gamepad.axisState[gamepad][axis]); - // 0.1f = GAMEPAD_AXIS_MINIMUM_DRIFT/DELTA - if (movement > value + 0.1f) value = CORE.Input.Gamepad.axisState[gamepad][axis]; + if (movement > value) value = CORE.Input.Gamepad.axisState[gamepad][axis]; } return value;