This commit is contained in:
Michał Cichoń 2017-07-12 21:35:56 +00:00 committed by GitHub
commit 8ab413d9e4
2 changed files with 6 additions and 3 deletions

View File

@ -31,7 +31,7 @@
////// GLFW platform API ////// ////// GLFW platform API //////
////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////
int _glfwPlatformPollJoystick(int jid, int mode) int _glfwPlatformPollJoystick(_GLFWjoystick* js, int mode)
{ {
return GLFW_FALSE; return GLFW_FALSE;
} }

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);
} }
} }