mirror of
https://github.com/glfw/glfw.git
synced 2024-11-10 09:01:46 +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:
parent
3a5fcfba06
commit
77e4c61190
@ -100,6 +100,9 @@ See the [GLFW 3.0 documentation](http://www.glfw.org/docs/3.0/).
|
|||||||
|
|
||||||
## Changelog
|
## Changelog
|
||||||
|
|
||||||
|
- [Win32] Bugfix: Context creation was attempted even if no valid pixel formats
|
||||||
|
had been found
|
||||||
|
|
||||||
|
|
||||||
## Contact
|
## Contact
|
||||||
|
|
||||||
|
@ -276,9 +276,13 @@ static GLboolean choosePixelFormat(_GLFWwindow* window,
|
|||||||
}
|
}
|
||||||
|
|
||||||
closest = _glfwChooseFBConfig(desired, usableConfigs, usableCount);
|
closest = _glfwChooseFBConfig(desired, usableConfigs, usableCount);
|
||||||
if (closest)
|
if (!closest)
|
||||||
*result = closest->wgl;
|
{
|
||||||
|
free(usableConfigs);
|
||||||
|
return GL_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
*result = closest->wgl;
|
||||||
free(usableConfigs);
|
free(usableConfigs);
|
||||||
|
|
||||||
return GL_TRUE;
|
return GL_TRUE;
|
||||||
|
Loading…
Reference in New Issue
Block a user