Skip to content

Commit

Permalink
Linux: Fix joystick without buttons being ignored
Browse files Browse the repository at this point in the history
Joysticks in Linux without buttons were ignored by device enumeration.
Remove the mandatory button attribute from detection.

Fixes glfw#2042
Closes glfw#2043
  • Loading branch information
heliflieger authored and elmindreda committed Jul 15, 2022
1 parent c50d531 commit c424fe5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/linux_joystick.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c424fe5

Please sign in to comment.