This commit is contained in:
Felipe Jorge 2025-07-19 10:46:17 -03:00 committed by GitHub
commit 1c156cd9fd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1261,11 +1261,8 @@ GLFWAPI void* glfwGetJoystickUserPointer(int jid)
GLFWAPI GLFWjoystickfun glfwSetJoystickCallback(GLFWjoystickfun cbfun) GLFWAPI GLFWjoystickfun glfwSetJoystickCallback(GLFWjoystickfun cbfun)
{ {
_GLFW_REQUIRE_INIT_OR_RETURN(NULL); _GLFW_REQUIRE_INIT_OR_RETURN(NULL);
if (!initJoysticks())
return NULL;
_GLFW_SWAP(GLFWjoystickfun, _glfw.callbacks.joystick, cbfun); _GLFW_SWAP(GLFWjoystickfun, _glfw.callbacks.joystick, cbfun);
initJoysticks();
return cbfun; return cbfun;
} }