mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 13:04:35 +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)
|
GLFWAPI void glfwGetGLVersion(int* major, int* minor, int* rev)
|
||||||
{
|
{
|
||||||
|
_GLFWwindow* window;
|
||||||
|
|
||||||
if (!_glfwInitialized)
|
if (!_glfwInitialized)
|
||||||
{
|
{
|
||||||
_glfwSetError(GLFW_NOT_INITIALIZED);
|
_glfwSetError(GLFW_NOT_INITIALIZED);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!_glfwLibrary.currentWindow)
|
window = _glfwLibrary.currentWindow;
|
||||||
|
if (!window)
|
||||||
{
|
{
|
||||||
_glfwSetError(GLFW_NO_CURRENT_WINDOW);
|
_glfwSetError(GLFW_NO_CURRENT_WINDOW);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
_GLFWwindow* window = _glfwLibrary.currentWindow;
|
|
||||||
|
|
||||||
if (major != NULL)
|
if (major != NULL)
|
||||||
*major = window->glMajor;
|
*major = window->glMajor;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user