Commit 2060de5e authored by Camilla Berglund's avatar Camilla Berglund
Browse files

Match presence of lib prefix on EGL/GLES binaries

parent d5e00e6b
......@@ -309,6 +309,8 @@ GLFWbool _glfwInitEGL(void)
if (!_glfw.egl.handle)
return GLFW_FALSE;
_glfw.egl.prefix = (strncmp(sonames[i], "lib", 3) == 0);
_glfw.egl.GetConfigAttrib = (PFNEGLGETCONFIGATTRIBPROC)
_glfw_dlsym(_glfw.egl.handle, "eglGetConfigAttrib");
_glfw.egl.GetConfigs = (PFNEGLGETCONFIGSPROC)
......@@ -627,6 +629,11 @@ GLFWbool _glfwCreateContextEGL(_GLFWwindow* window,
for (i = 0; sonames[i]; i++)
{
// HACK: Match presence of lib prefix to increase chance of finding
// a matching pair in the jungle that is Win32 EGL/GLES
if (_glfw.egl.prefix != (strncmp(sonames[i], "lib", 3) == 0))
continue;
window->context.egl.client = _glfw_dlopen(sonames[i]);
if (window->context.egl.client)
break;
......
......@@ -171,6 +171,7 @@ typedef struct _GLFWlibraryEGL
{
EGLDisplay display;
EGLint major, minor;
GLFWbool prefix;
GLFWbool KHR_create_context;
GLFWbool KHR_create_context_no_error;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment