Oh, right, this is C.

This commit is contained in:
Camilla Berglund 2010-09-14 00:20:42 +02:00
parent b5b80dde40
commit 8907019e34

View File

@ -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;