mirror of
https://github.com/glfw/glfw.git
synced 2026-09-21 08:39:45 +00:00
Fix error type for unavailable pixel format error
All backends reported this as GLFW_PLATFORM_ERROR, while the documentation mandates GLFW_FORMAT_UNAVAILABLE.
This commit is contained in:
+1
-1
@@ -306,7 +306,7 @@ int _glfwCreateContext(_GLFWwindow* window,
|
||||
|
||||
if (!chooseFBConfigs(ctxconfig, fbconfig, &config))
|
||||
{
|
||||
_glfwInputError(GLFW_PLATFORM_ERROR,
|
||||
_glfwInputError(GLFW_FORMAT_UNAVAILABLE,
|
||||
"EGL: Failed to find a suitable EGLConfig");
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
||||
+1
-1
@@ -321,7 +321,7 @@ int _glfwCreateContext(_GLFWwindow* window,
|
||||
|
||||
if (!chooseFBConfig(fbconfig, &native))
|
||||
{
|
||||
_glfwInputError(GLFW_PLATFORM_ERROR,
|
||||
_glfwInputError(GLFW_FORMAT_UNAVAILABLE,
|
||||
"GLX: Failed to find a suitable GLXFBConfig");
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
||||
+2
-2
@@ -211,8 +211,8 @@ int _glfwCreateContext(_GLFWwindow* window,
|
||||
[[NSOpenGLPixelFormat alloc] initWithAttributes:attributes];
|
||||
if (window->nsgl.pixelFormat == nil)
|
||||
{
|
||||
_glfwInputError(GLFW_PLATFORM_ERROR,
|
||||
"NSGL: Failed to create OpenGL pixel format");
|
||||
_glfwInputError(GLFW_FORMAT_UNAVAILABLE,
|
||||
"NSGL: Failed to find a suitable pixel format");
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -250,7 +250,7 @@ static GLboolean choosePixelFormat(_GLFWwindow* window,
|
||||
closest = _glfwChooseFBConfig(desired, usableConfigs, usableCount);
|
||||
if (!closest)
|
||||
{
|
||||
_glfwInputError(GLFW_PLATFORM_ERROR,
|
||||
_glfwInputError(GLFW_FORMAT_UNAVAILABLE,
|
||||
"WGL: Failed to find a suitable pixel format");
|
||||
|
||||
free(usableConfigs);
|
||||
|
||||
Reference in New Issue
Block a user