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;