From 9d0e1021359e0d4d857f609bb361107a7690b12d Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Tue, 30 Jul 2013 14:19:24 +0200 Subject: [PATCH] Fixed glfwCreateWindow return value semantics. --- src/window.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/window.c b/src/window.c index d5a8ef7e..cb9064ce 100644 --- a/src/window.c +++ b/src/window.c @@ -158,7 +158,7 @@ GLFWAPI GLFWwindow* glfwCreateWindow(int width, int height, 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 @@ GLFWAPI GLFWwindow* glfwCreateWindow(int width, int height, // 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 @@ GLFWAPI GLFWwindow* glfwCreateWindow(int width, int height, { glfwDestroyWindow((GLFWwindow*) window); glfwMakeContextCurrent((GLFWwindow*) previous); - return GL_FALSE; + return NULL; } glfwMakeContextCurrent((GLFWwindow*) window); @@ -239,7 +239,7 @@ GLFWAPI GLFWwindow* glfwCreateWindow(int width, int height, { glfwDestroyWindow((GLFWwindow*) window); glfwMakeContextCurrent((GLFWwindow*) previous); - return GL_FALSE; + return NULL; } // Verify the context against the requested parameters @@ -247,7 +247,7 @@ GLFWAPI GLFWwindow* glfwCreateWindow(int width, int height, { glfwDestroyWindow((GLFWwindow*) window); glfwMakeContextCurrent((GLFWwindow*) previous); - return GL_FALSE; + return NULL; } // Clearing the front buffer to black to avoid garbage pixels left over