1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-22 18:28:52 -05:00

Linux: Fix duplicate joystick objects

This fixes a regression introduced by
2c204ab52e.  This broke the check for
whether there is already a GLFW joystick object for a given input
device, making it always fail.
This commit is contained in:
Camilla Löwy 2022-07-12 11:44:37 +02:00
parent 6dd526fb1a
commit fd7e737216

View File

@ -128,7 +128,7 @@ static GLFWbool openJoystickDevice(const char* path)
{
for (int jid = 0; jid <= GLFW_JOYSTICK_LAST; jid++)
{
if (_glfw.joysticks[jid].connected)
if (!_glfw.joysticks[jid].connected)
continue;
if (strcmp(_glfw.joysticks[jid].linjs.path, path) == 0)
return GLFW_FALSE;