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 c424fe5589)
This commit is contained in:
Björn Hempel 2022-02-06 13:32:10 +01:00 committed by Camilla Löwy
parent 4affd2207c
commit 388d0cf7c2

View File

@ -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;