Fallback to eglGetDisplay() when eglGetPlatformDisplayEXT() returns EGL_NO_DISPLAY
This commit is contained in:
6
glfw/egl_context.c
vendored
6
glfw/egl_context.c
vendored
@@ -388,6 +388,7 @@ bool _glfwInitEGL(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
_glfw.egl.platform = _glfwPlatformGetEGLPlatform(&attribs);
|
_glfw.egl.platform = _glfwPlatformGetEGLPlatform(&attribs);
|
||||||
|
_glfw.egl.display = EGL_NO_DISPLAY;
|
||||||
if (_glfw.egl.platform)
|
if (_glfw.egl.platform)
|
||||||
{
|
{
|
||||||
_glfw.egl.display =
|
_glfw.egl.display =
|
||||||
@@ -395,10 +396,11 @@ bool _glfwInitEGL(void)
|
|||||||
_glfwPlatformGetEGLNativeDisplay(),
|
_glfwPlatformGetEGLNativeDisplay(),
|
||||||
attribs);
|
attribs);
|
||||||
}
|
}
|
||||||
else
|
free(attribs);
|
||||||
|
|
||||||
|
if (_glfw.egl.display == EGL_NO_DISPLAY)
|
||||||
_glfw.egl.display = eglGetDisplay(_glfwPlatformGetEGLNativeDisplay());
|
_glfw.egl.display = eglGetDisplay(_glfwPlatformGetEGLNativeDisplay());
|
||||||
|
|
||||||
free(attribs);
|
|
||||||
|
|
||||||
EGLint egl_err;
|
EGLint egl_err;
|
||||||
if (_glfw.egl.display == EGL_NO_DISPLAY && (egl_err = eglGetError()) != EGL_SUCCESS)
|
if (_glfw.egl.display == EGL_NO_DISPLAY && (egl_err = eglGetError()) != EGL_SUCCESS)
|
||||||
|
|||||||
Reference in New Issue
Block a user