This commit is contained in:
Felipe Jorge 2025-09-03 14:37:53 +02:00 committed by GitHub
commit 7ecf8e0144
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;
} }