From f872f239e42c24af9fcd944edb2851cba9b1cf78 Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 12 Oct 2023 17:38:21 -0400 Subject: [PATCH] Fix axis count being reset to 0 --- src/rcore_drm.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/rcore_drm.c b/src/rcore_drm.c index bd2201c32..e214420e5 100644 --- a/src/rcore_drm.c +++ b/src/rcore_drm.c @@ -862,11 +862,6 @@ void PollInputEvents(void) // Reset last gamepad button/axis registered state CORE.Input.Gamepad.lastButtonPressed = 0; // GAMEPAD_BUTTON_UNKNOWN - for (int i = 0; i < MAX_GAMEPADS; i++) - { - CORE.Input.Gamepad.axisCount[i] = 0; - } - // Register previous keys states for (int i = 0; i < MAX_KEYBOARD_KEYS; i++) { @@ -1529,6 +1524,7 @@ static void InitDrmJoystick(int index, const char *path) for (int axis = 0; axis < ABS_MAX; axis++) { if (MI_IS_BIT_SET(abs_bits, axis)) { + TraceLog(LOG_INFO, TextFormat("Gamepad %d has axis %d", index, axis); CORE.Input.Gamepad.axisCount[index]++; } }