mirror of
https://github.com/glfw/glfw.git
synced 2026-09-18 22:55:46 +00:00
Added macros for library initialization check.
This commit is contained in:
+1
-7
@@ -930,13 +930,7 @@ void _glfwPlatformSetCursorMode(_GLFWwindow* window, int mode)
|
||||
GLFWAPI id glfwGetCocoaWindow(GLFWwindow* handle)
|
||||
{
|
||||
_GLFWwindow* window = (_GLFWwindow*) handle;
|
||||
|
||||
if (!_glfwInitialized)
|
||||
{
|
||||
_glfwInputError(GLFW_NOT_INITIALIZED, NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
_GLFW_REQUIRE_INIT_OR_RETURN(nil);
|
||||
return window->ns.object;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user