mirror of
https://github.com/glfw/glfw.git
synced 2026-09-19 23:35:24 +00:00
Renamed no current context error to match function.
This commit is contained in:
+2
-2
@@ -115,8 +115,8 @@ GLFWAPI const char* glfwErrorString(int error)
|
||||
return "No error";
|
||||
case GLFW_NOT_INITIALIZED:
|
||||
return "The GLFW library is not initialized";
|
||||
case GLFW_NO_CURRENT_WINDOW:
|
||||
return "There is no current GLFW window";
|
||||
case GLFW_NO_CURRENT_CONTEXT:
|
||||
return "There is no current OpenGL context";
|
||||
case GLFW_INVALID_ENUM:
|
||||
return "Invalid argument for enum parameter";
|
||||
case GLFW_INVALID_VALUE:
|
||||
|
||||
+4
-4
@@ -551,7 +551,7 @@ GLFWAPI void glfwSwapBuffers(void)
|
||||
|
||||
if (!_glfwLibrary.currentWindow)
|
||||
{
|
||||
_glfwSetError(GLFW_NO_CURRENT_WINDOW, NULL);
|
||||
_glfwSetError(GLFW_NO_CURRENT_CONTEXT, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -573,7 +573,7 @@ GLFWAPI void glfwSwapInterval(int interval)
|
||||
|
||||
if (!_glfwLibrary.currentWindow)
|
||||
{
|
||||
_glfwSetError(GLFW_NO_CURRENT_WINDOW, NULL);
|
||||
_glfwSetError(GLFW_NO_CURRENT_CONTEXT, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -599,7 +599,7 @@ GLFWAPI int glfwExtensionSupported(const char* extension)
|
||||
window = _glfwLibrary.currentWindow;
|
||||
if (!window)
|
||||
{
|
||||
_glfwSetError(GLFW_NO_CURRENT_WINDOW, NULL);
|
||||
_glfwSetError(GLFW_NO_CURRENT_CONTEXT, NULL);
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
||||
@@ -659,7 +659,7 @@ GLFWAPI GLFWglproc glfwGetProcAddress(const char* procname)
|
||||
|
||||
if (!_glfwLibrary.currentWindow)
|
||||
{
|
||||
_glfwSetError(GLFW_NO_CURRENT_WINDOW, NULL);
|
||||
_glfwSetError(GLFW_NO_CURRENT_CONTEXT, NULL);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user