From 388d0cf7c2ffa79ff5b966feafaa26c594c60e59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Hempel?= Date: Sun, 6 Feb 2022 13:32:10 +0100 Subject: [PATCH] Linux: Fix joystick without buttons being ignored Joysticks in Linux without buttons were ignored by device enumeration. Remove the mandatory button attribute from detection. Fixes #2042 Closes #2043 (cherry picked from commit c424fe55892e7ac7c849989b9ab5e143825fdd4e) --- src/linux_joystick.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/linux_joystick.c b/src/linux_joystick.c index 0894a726..5d8c8d04 100644 --- a/src/linux_joystick.c +++ b/src/linux_joystick.c @@ -157,7 +157,7 @@ static GLFWbool openJoystickDevice(const char* path) } // Ensure this device supports the events expected of a joystick - if (!isBitSet(EV_KEY, evBits) || !isBitSet(EV_ABS, evBits)) + if (!isBitSet(EV_ABS, evBits)) { close(linjs.fd); return GLFW_FALSE;