From e2e3f2a20bb3667fc0830e2d0f63af2ddf71cd54 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Sat, 9 Aug 2014 10:23:28 -0400 Subject: [PATCH] EGL: Stop the window_handle shuffling as well --- Source/Core/DolphinWX/GLInterface/EGL.cpp | 9 ++++----- Source/Core/DolphinWX/GLInterface/GLInterface.h | 1 - 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Source/Core/DolphinWX/GLInterface/EGL.cpp b/Source/Core/DolphinWX/GLInterface/EGL.cpp index 2c124332cf..b36aed38a5 100644 --- a/Source/Core/DolphinWX/GLInterface/EGL.cpp +++ b/Source/Core/DolphinWX/GLInterface/EGL.cpp @@ -156,9 +156,11 @@ bool cInterfaceEGL::Create(void *&window_handle) else eglBindAPI(EGL_OPENGL_ES_API); + EGLNativeWindowType native_window = window_handle; + EGLint format; eglGetConfigAttrib(GLWin.egl_dpy, config, EGL_NATIVE_VISUAL_ID, &format); - ANativeWindow_setBuffersGeometry((EGLNativeWindowType)Host_GetRenderHandle(), 0, 0, format); + ANativeWindow_setBuffersGeometry(native_window, 0, 0, format); int none, width, height; Host_GetRenderWindowSize(none, none, width, height); GLWin.width = width; @@ -184,16 +186,13 @@ bool cInterfaceEGL::Create(void *&window_handle) exit(1); } - GLWin.native_window = Host_GetRenderHandle(); - - GLWin.egl_surf = eglCreateWindowSurface(GLWin.egl_dpy, config, GLWin.native_window, nullptr); + GLWin.egl_surf = eglCreateWindowSurface(GLWin.egl_dpy, config, native_window, nullptr); if (!GLWin.egl_surf) { INFO_LOG(VIDEO, "Error: eglCreateWindowSurface failed\n"); exit(1); } - window_handle = (void *)GLWin.native_window; return true; } diff --git a/Source/Core/DolphinWX/GLInterface/GLInterface.h b/Source/Core/DolphinWX/GLInterface/GLInterface.h index bcd0286f41..ee894b34dc 100644 --- a/Source/Core/DolphinWX/GLInterface/GLInterface.h +++ b/Source/Core/DolphinWX/GLInterface/GLInterface.h @@ -24,7 +24,6 @@ typedef struct { EGLSurface egl_surf; EGLContext egl_ctx; EGLDisplay egl_dpy; - EGLNativeWindowType native_window; #elif defined(__APPLE__) NSView *cocoaWin; NSOpenGLContext *cocoaCtx;