From 3d23690216a94bd5235c1931d43032b360da73cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sami=20Ky=C3=B6stil=C3=A4?= Date: Tue, 31 May 2016 00:41:11 +0100 Subject: [PATCH] Give a valid display parameter to eglMakeCurrent (#800) --- src/glcontext_egl.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/glcontext_egl.cpp b/src/glcontext_egl.cpp index c47acd9e1..b15073348 100644 --- a/src/glcontext_egl.cpp +++ b/src/glcontext_egl.cpp @@ -123,7 +123,7 @@ EGL_IMPORT ~SwapChainGL() { - eglMakeCurrent(EGL_NO_DISPLAY, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); + eglMakeCurrent(m_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); eglDestroyContext(m_display, m_context); eglDestroySurface(m_display, m_surface); } @@ -324,7 +324,7 @@ EGL_IMPORT { if (NULL != m_display) { - eglMakeCurrent(EGL_NO_DISPLAY, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); + eglMakeCurrent(m_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); eglDestroyContext(m_display, m_context); eglDestroySurface(m_display, m_surface); eglTerminate(m_display); @@ -344,7 +344,7 @@ EGL_IMPORT if (NULL != m_display) { EGLNativeWindowType nwh = (EGLNativeWindowType )g_platformData.nwh; - eglMakeCurrent(EGL_NO_DISPLAY, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); + eglMakeCurrent(m_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); eglDestroySurface(m_display, m_surface); m_surface = eglCreateWindowSurface(m_display, m_config, nwh, NULL); BGFX_FATAL(m_surface != EGL_NO_SURFACE, Fatal::UnableToInitialize, "Failed to create surface.");