mirror of
https://github.com/glfw/glfw.git
synced 2025-10-04 21:56:36 +00:00
Error checking for pre-existing joystick in matchCallback in cocoa_joystick.m
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.
This commit is contained in:
parent
d97044d9ac
commit
7bc5c9e382
@ -276,7 +276,7 @@ static void matchCallback(void* context,
|
|||||||
|
|
||||||
for (joy = GLFW_JOYSTICK_1; joy <= GLFW_JOYSTICK_LAST; joy++)
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user