diff --git a/src/input.c b/src/input.c index 25fd71c5..f82e4bb1 100644 --- a/src/input.c +++ b/src/input.c @@ -1074,7 +1074,8 @@ GLFWAPI const unsigned char* glfwGetJoystickHats(int jid, int* count) if (!_glfw.platform.pollJoystick(js, _GLFW_POLL_BUTTONS)) return NULL; - return *count = js->hats; + *count = js->hatCount; + return js->hats; } GLFWAPI const char* glfwGetJoystickName(int jid)