mirror of
https://github.com/glfw/glfw.git
synced 2024-11-11 13:03:52 +00:00
Oh, right, this is C.
This commit is contained in:
parent
b5b80dde40
commit
8907019e34
@ -215,20 +215,21 @@ GLFWAPI void* glfwGetProcAddress(const char* procname)
|
||||
|
||||
GLFWAPI void glfwGetGLVersion(int* major, int* minor, int* rev)
|
||||
{
|
||||
_GLFWwindow* window;
|
||||
|
||||
if (!_glfwInitialized)
|
||||
{
|
||||
_glfwSetError(GLFW_NOT_INITIALIZED);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!_glfwLibrary.currentWindow)
|
||||
window = _glfwLibrary.currentWindow;
|
||||
if (!window)
|
||||
{
|
||||
_glfwSetError(GLFW_NO_CURRENT_WINDOW);
|
||||
return;
|
||||
}
|
||||
|
||||
_GLFWwindow* window = _glfwLibrary.currentWindow;
|
||||
|
||||
if (major != NULL)
|
||||
*major = window->glMajor;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user