1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-29 21:48:52 -05:00

Win32: Fix bad call to _glfwPlatformPollJoystick

Related to #1043.
This commit is contained in:
Michał Cichoń 2017-07-12 23:25:38 +02:00 committed by Camilla Löwy
parent afbd589348
commit 50a228394f

View File

@ -576,11 +576,14 @@ void _glfwDetectJoystickConnectionWin32(void)
void _glfwDetectJoystickDisconnectionWin32(void) void _glfwDetectJoystickDisconnectionWin32(void)
{ {
int jid; int jid;
_GLFWjoystick* js;
for (jid = 0; jid <= GLFW_JOYSTICK_LAST; jid++) for (jid = 0; jid <= GLFW_JOYSTICK_LAST; jid++)
{ {
if (_glfw.joysticks[jid].present) js = &_glfw.joysticks[jid];
_glfwPlatformPollJoystick(jid, _GLFW_POLL_PRESENCE);
if (js->present)
_glfwPlatformPollJoystick(js, _GLFW_POLL_PRESENCE);
} }
} }