From bcdb1ea8ec1ede742cbdb19b3bae8d2bd345a329 Mon Sep 17 00:00:00 2001 From: HALX99 Date: Fri, 12 Jun 2020 12:36:52 +0800 Subject: [PATCH] fix compile error --- src/egl_context.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/egl_context.c b/src/egl_context.c index 8ff519273..2c20e0dd6 100644 --- a/src/egl_context.c +++ b/src/egl_context.c @@ -396,9 +396,7 @@ GLFWbool _glfwInitEGL(void) } #if defined(_WIN32) - _GLFWwindow* mainWindow = _glfw.windowListHead; - HDC dc = GetDC(mainWindow->win32.handle); - _glfw.egl.display = eglGetDisplay(dc); + _glfw.egl.display = eglGetDisplay(GetDC(_glfw.windowListHead->win32.handle)); #else _glfw.egl.display = eglGetDisplay(_GLFW_EGL_NATIVE_DISPLAY); #endif