浏览代码

Win32: Fix bad call to _glfwPlatformPollJoystick

Related to #1043.
Michał Cichoń 8 年之前
父节点
当前提交
50a228394f
共有 1 个文件被更改,包括 5 次插入2 次删除
  1. 5 2
      src/win32_joystick.c

+ 5 - 2
src/win32_joystick.c

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