Fixed glfwCreateWindow return value semantics.
diff --git a/src/window.c b/src/window.c
index d5a8ef7..cb9064c 100644
--- a/src/window.c
+++ b/src/window.c
@@ -158,7 +158,7 @@
if (width <= 0 || height <= 0)
{
_glfwInputError(GLFW_INVALID_VALUE, "Invalid window size");
- return GL_FALSE;
+ return NULL;
}
// Set up desired framebuffer config
@@ -196,7 +196,7 @@
// Check the OpenGL bits of the window config
if (!_glfwIsValidContextConfig(&wndconfig))
- return GL_FALSE;
+ return NULL;
window = calloc(1, sizeof(_GLFWwindow));
window->next = _glfw.windowListHead;
@@ -229,7 +229,7 @@
{
glfwDestroyWindow((GLFWwindow*) window);
glfwMakeContextCurrent((GLFWwindow*) previous);
- return GL_FALSE;
+ return NULL;
}
glfwMakeContextCurrent((GLFWwindow*) window);
@@ -239,7 +239,7 @@
{
glfwDestroyWindow((GLFWwindow*) window);
glfwMakeContextCurrent((GLFWwindow*) previous);
- return GL_FALSE;
+ return NULL;
}
// Verify the context against the requested parameters
@@ -247,7 +247,7 @@
{
glfwDestroyWindow((GLFWwindow*) window);
glfwMakeContextCurrent((GLFWwindow*) previous);
- return GL_FALSE;
+ return NULL;
}
// Clearing the front buffer to black to avoid garbage pixels left over