1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-23 10:48:51 -05:00

Fix test for joystick presence in matchCallback

The matchCallback function has an initial loop to filter out redundant
joystick additions based on matching deviceRef values.  However, the if
statement incorrectly combines this test with the condition that the
joystick is not present, which is obviously incorrect.

Closes #753.
This commit is contained in:
IntellectualKitty 2016-04-27 06:04:16 -06:00 committed by Camilla Berglund
parent d97044d9ac
commit 3b0b5dacf5

View File

@ -276,7 +276,7 @@ static void matchCallback(void* context,
for (joy = GLFW_JOYSTICK_1; joy <= GLFW_JOYSTICK_LAST; joy++)
{
if (!_glfw.ns_js.js[joy].present && _glfw.ns_js.js[joy].deviceRef == deviceRef)
if (_glfw.ns_js.js[joy].present && _glfw.ns_js.js[joy].deviceRef == deviceRef)
return;
}