From 5e3f0fd5464095ad077d425e2c415e133efc4f54 Mon Sep 17 00:00:00 2001 From: asdqwe Date: Tue, 22 Oct 2024 16:31:54 -0300 Subject: [PATCH] Add parameter validation --- src/rcore.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/rcore.c b/src/rcore.c index 626b7521a..4e85bd79c 100644 --- a/src/rcore.c +++ b/src/rcore.c @@ -3307,6 +3307,7 @@ float GetGamepadAxisMovement(int gamepad, int axis) // Set gamepad global deadzone void SetGamepadDeadzone(float deadzone) { + if (deadzone < 0.0f) deadzone = 0.0f; CORE.Input.Gamepad.globalDeadzone = deadzone; }