mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-23 02:38:52 -05: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:
parent
40da56fbf7
commit
7c6a8775eb
|
@ -102,13 +102,17 @@ GLFW bundles a number of dependencies in the `deps/` directory.
|
||||||
- [WGL] Made all WGL functions dynamically loaded
|
- [WGL] Made all WGL functions dynamically loaded
|
||||||
- [WGL] Removed `GLFW_USE_DWM_SWAP_INTERVAL` compile-time option
|
- [WGL] Removed `GLFW_USE_DWM_SWAP_INTERVAL` compile-time option
|
||||||
- [WGL] Bugfix: Swap interval was ignored when DWM was enabled
|
- [WGL] Bugfix: Swap interval was ignored when DWM was enabled
|
||||||
|
- [WGL] Bugfix: Failure to find a pixel format was reported incorrectly
|
||||||
- [GLX] Added dependency on `libdl` on systems where it provides `dlopen`
|
- [GLX] Added dependency on `libdl` on systems where it provides `dlopen`
|
||||||
- [GLX] Made all GLX functions dynamically loaded
|
- [GLX] Made all GLX functions dynamically loaded
|
||||||
- [GLX] Removed `_GLFW_HAS_GLXGETPROCADDRESS*` and `_GLFW_HAS_DLOPEN`
|
- [GLX] Removed `_GLFW_HAS_GLXGETPROCADDRESS*` and `_GLFW_HAS_DLOPEN`
|
||||||
compile-time options
|
compile-time options
|
||||||
|
- [GLX] Bugfix: Failure to find a `GLXFBConfig` was reported incorrectly
|
||||||
- [EGL] Made all EGL functions dynamically loaded
|
- [EGL] Made all EGL functions dynamically loaded
|
||||||
- [EGL] Bugfix: `glfwGetProcAddress` did not return the addresses of core
|
- [EGL] Bugfix: `glfwGetProcAddress` did not return the addresses of core
|
||||||
functions
|
functions
|
||||||
|
- [EGL] Bugfix: Failure to find an `EGLConfig` was reported incorrectly
|
||||||
|
- [NSGL] Bugfix: Failure to find a pixel format was reported incorrectly
|
||||||
|
|
||||||
|
|
||||||
## Contact
|
## Contact
|
||||||
|
|
|
@ -306,7 +306,7 @@ int _glfwCreateContext(_GLFWwindow* window,
|
||||||
|
|
||||||
if (!chooseFBConfigs(ctxconfig, fbconfig, &config))
|
if (!chooseFBConfigs(ctxconfig, fbconfig, &config))
|
||||||
{
|
{
|
||||||
_glfwInputError(GLFW_PLATFORM_ERROR,
|
_glfwInputError(GLFW_FORMAT_UNAVAILABLE,
|
||||||
"EGL: Failed to find a suitable EGLConfig");
|
"EGL: Failed to find a suitable EGLConfig");
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -321,7 +321,7 @@ int _glfwCreateContext(_GLFWwindow* window,
|
||||||
|
|
||||||
if (!chooseFBConfig(fbconfig, &native))
|
if (!chooseFBConfig(fbconfig, &native))
|
||||||
{
|
{
|
||||||
_glfwInputError(GLFW_PLATFORM_ERROR,
|
_glfwInputError(GLFW_FORMAT_UNAVAILABLE,
|
||||||
"GLX: Failed to find a suitable GLXFBConfig");
|
"GLX: Failed to find a suitable GLXFBConfig");
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -211,8 +211,8 @@ int _glfwCreateContext(_GLFWwindow* window,
|
||||||
[[NSOpenGLPixelFormat alloc] initWithAttributes:attributes];
|
[[NSOpenGLPixelFormat alloc] initWithAttributes:attributes];
|
||||||
if (window->nsgl.pixelFormat == nil)
|
if (window->nsgl.pixelFormat == nil)
|
||||||
{
|
{
|
||||||
_glfwInputError(GLFW_PLATFORM_ERROR,
|
_glfwInputError(GLFW_FORMAT_UNAVAILABLE,
|
||||||
"NSGL: Failed to create OpenGL pixel format");
|
"NSGL: Failed to find a suitable pixel format");
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -250,7 +250,7 @@ static GLboolean choosePixelFormat(_GLFWwindow* window,
|
||||||
closest = _glfwChooseFBConfig(desired, usableConfigs, usableCount);
|
closest = _glfwChooseFBConfig(desired, usableConfigs, usableCount);
|
||||||
if (!closest)
|
if (!closest)
|
||||||
{
|
{
|
||||||
_glfwInputError(GLFW_PLATFORM_ERROR,
|
_glfwInputError(GLFW_FORMAT_UNAVAILABLE,
|
||||||
"WGL: Failed to find a suitable pixel format");
|
"WGL: Failed to find a suitable pixel format");
|
||||||
|
|
||||||
free(usableConfigs);
|
free(usableConfigs);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user