mirror of
https://github.com/glfw/glfw.git
synced 2026-09-21 16:44:11 +00:00
Fixed broken WGL error detection.
Context creation was attempted even if no valid pixel formats had been found during enumeration.
This commit is contained in:
+6
-2
@@ -276,9 +276,13 @@ static GLboolean choosePixelFormat(_GLFWwindow* window,
|
||||
}
|
||||
|
||||
closest = _glfwChooseFBConfig(desired, usableConfigs, usableCount);
|
||||
if (closest)
|
||||
*result = closest->wgl;
|
||||
if (!closest)
|
||||
{
|
||||
free(usableConfigs);
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
||||
*result = closest->wgl;
|
||||
free(usableConfigs);
|
||||
|
||||
return GL_TRUE;
|
||||
|
||||
Reference in New Issue
Block a user