8000 Added glfwIsInitialized function by Frostie314159 · Pull Request #2065 · glfw/glfw · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Added glfwIsInitialized function #2065

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions include/GLFW/glfw3.h
Original file line number Diff line number Diff line change
Expand Up @@ -2364,6 +2364,22 @@ GLFWAPI const char* glfwGetVersionString(void);
*/
GLFWAPI int glfwGetError(const char** description);

/*! @brief Returns the initialization state.
* This function returns whether the library has been initialized or not.
* @return `GLFW_TRUE` if initialized, or `GLFW_FALSE` otherwise.
*
* @errors None.
*
* @remark This function may be called before @ref glfwInit.
*
* @thread_safety This function may be called from any thread.
*
* @since Added in version 3.3.6
*
* @ingroup init
*/
GLFWAPI int glfwIsInitialized(void);

/*! @brief Sets the error callback.
*
* This function sets the error callback, which is called with an error code
Expand Down Expand Up @@ -2408,6 +2424,7 @@ GLFWAPI int glfwGetError(const char** description);
*
* @ingroup init
*/

GLFWAPI GLFWerrorfun glfwSetErrorCallback(GLFWerrorfun callback);

/*! @brief Returns the currently selected platform.
Expand Down
5 changes: 5 additions & 0 deletions src/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,11 @@ GLFWAPI int glfwGetError(const char** description)
return code;
}

GLFWAPI int glfwIsInitialized(void)
{
return _glfw.initialized;
}

GLFWAPI GLFWerrorfun glfwSetErrorCallback(GLFWerrorfun cbfun)
{
_GLFW_SWAP(GLFWerrorfun, _glfwErrorCallback, cbfun);
Expand Down
2942
0