From 8db7528ac7518a12c0db5b1af6a55302398dd0c9 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Tue, 18 Aug 2015 16:56:19 +0200 Subject: [PATCH] Add support for Cygwin libGL soname --- src/glx_context.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/glx_context.c b/src/glx_context.c index 5e149c60..371355c1 100644 --- a/src/glx_context.c +++ b/src/glx_context.c @@ -156,10 +156,16 @@ static GLXContext createLegacyContext(_GLFWwindow* window, // int _glfwInitContextAPI(void) { +#if defined(__CYGWIN__) + const char* soname = "libGL-1.so"; +#else + const char* soname = "libGL.so.1"; +#endif + if (!_glfwCreateContextTLS()) return GL_FALSE; - _glfw.glx.handle = dlopen("libGL.so.1", RTLD_LAZY | RTLD_GLOBAL); + _glfw.glx.handle = dlopen(soname, RTLD_LAZY | RTLD_GLOBAL); if (!_glfw.glx.handle) { _glfwInputError(GLFW_API_UNAVAILABLE, "GLX: %s", dlerror());