This commit is contained in:
Felipe Jorge 2025-08-18 12:02:26 +00:00 committed by GitHub
commit 399a8e9b1d
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;
} }