From 202054708b1f221c720736ddee06741d66403ce3 Mon Sep 17 00:00:00 2001 From: Scott Moreau Date: Thu, 23 Jan 2014 19:41:07 -0700 Subject: [PATCH] EGL: Fix android build broken by last commit --- Source/Core/DolphinWX/GLInterface/EGL.cpp | 4 +--- Source/Core/DolphinWX/GLInterface/EGL.h | 2 +- Source/Core/DolphinWX/GLInterface/Platform.cpp | 4 ++-- Source/Core/DolphinWX/GLInterface/X11_Util.cpp | 3 ++- Source/Core/DolphinWX/GLInterface/X11_Util.h | 2 +- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Source/Core/DolphinWX/GLInterface/EGL.cpp b/Source/Core/DolphinWX/GLInterface/EGL.cpp index 9a97384ddc..3b3779d3df 100644 --- a/Source/Core/DolphinWX/GLInterface/EGL.cpp +++ b/Source/Core/DolphinWX/GLInterface/EGL.cpp @@ -173,9 +173,7 @@ bool cInterfaceEGL::Create(void *&window_handle) else eglBindAPI(EGL_OPENGL_ES_API); - GLWin.parent = (Window) window_handle; - - if (!Platform.Init(config)) + if (!Platform.Init(config, window_handle)) return false; s = eglQueryString(GLWin.egl_dpy, EGL_VERSION); diff --git a/Source/Core/DolphinWX/GLInterface/EGL.h b/Source/Core/DolphinWX/GLInterface/EGL.h index 2286bd74d3..3a3be92377 100644 --- a/Source/Core/DolphinWX/GLInterface/EGL.h +++ b/Source/Core/DolphinWX/GLInterface/EGL.h @@ -34,7 +34,7 @@ private: public: enum egl_platform platform; bool SelectDisplay(void); - bool Init(EGLConfig config); + bool Init(EGLConfig config, void *window_handle); EGLDisplay EGLGetDisplay(void); EGLNativeWindowType CreateWindow(void); void DestroyWindow(void); diff --git a/Source/Core/DolphinWX/GLInterface/Platform.cpp b/Source/Core/DolphinWX/GLInterface/Platform.cpp index 9874b6702c..d020a83fdb 100644 --- a/Source/Core/DolphinWX/GLInterface/Platform.cpp +++ b/Source/Core/DolphinWX/GLInterface/Platform.cpp @@ -126,7 +126,7 @@ out: return true; } -bool cPlatform::Init(EGLConfig config) +bool cPlatform::Init(EGLConfig config, void *window_handle) { #if HAVE_WAYLAND if (cPlatform::platform == EGL_PLATFORM_WAYLAND) @@ -135,7 +135,7 @@ bool cPlatform::Init(EGLConfig config) #endif #if HAVE_X11 if (cPlatform::platform == EGL_PLATFORM_X11) - if (!XInterface.Initialize(config)) + if (!XInterface.Initialize(config, window_handle)) return false; #endif #ifdef ANDROID diff --git a/Source/Core/DolphinWX/GLInterface/X11_Util.cpp b/Source/Core/DolphinWX/GLInterface/X11_Util.cpp index 5e42809daa..a20c88fdfe 100644 --- a/Source/Core/DolphinWX/GLInterface/X11_Util.cpp +++ b/Source/Core/DolphinWX/GLInterface/X11_Util.cpp @@ -30,7 +30,7 @@ bool cXInterface::ServerConnect(void) return true; } -bool cXInterface::Initialize(void *config) +bool cXInterface::Initialize(void *config, void *window_handle) { int _tx, _ty, _twidth, _theight; XVisualInfo visTemplate; @@ -63,6 +63,7 @@ bool cXInterface::Initialize(void *config) GLWin.height = _theight; GLWin.evdpy = XOpenDisplay(NULL); + GLWin.parent = (Window) window_handle; GLWin.screen = DefaultScreen(GLWin.dpy); if (GLWin.parent == 0) diff --git a/Source/Core/DolphinWX/GLInterface/X11_Util.h b/Source/Core/DolphinWX/GLInterface/X11_Util.h index 683749e260..1e62375fbb 100644 --- a/Source/Core/DolphinWX/GLInterface/X11_Util.h +++ b/Source/Core/DolphinWX/GLInterface/X11_Util.h @@ -28,7 +28,7 @@ private: void XEventThread(); public: bool ServerConnect(void); - bool Initialize(void *config); + bool Initialize(void *config, void *window_handle); void *EGLGetDisplay(void); void *CreateWindow(void); void DestroyWindow(void);