From bd1aa13182327a6fb1ef7ecb1196102ae5e6b46f Mon Sep 17 00:00:00 2001 From: nakeee Date: Fri, 12 Dec 2008 08:53:15 +0000 Subject: [PATCH] can someone test it on win? git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1507 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp b/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp index f31a603c78..f445e4c3ad 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp @@ -208,14 +208,16 @@ bool OpenGL_Create(SVideoInitialize &_VideoInitialize, int _iwidth, int _iheight GLWin.cocoaWin = cocoaGLCreateWindow(GLWin.width, GLWin.height); GLWin.cocoaCtx = cocoaGLInit(g_Config.iMultisampleMode); #elif defined(USE_WX) && USE_WX - int attrib[2]; - attrib[0] = 16; //WX_GL_DEPTH_SIZE; - attrib[1] = 32; wxSize size(_iwidth, _iheight); - GLWin.frame = new wxFrame((wxFrame *)NULL, -1,_ ("Dolphin"), - wxPoint(50,50), size); - GLWin.glCanvas = new wxGLCanvas(GLWin.frame, wxID_ANY, attrib, + if (!g_Config.renderToMainframe || + g_VideoInitialize.pWindowHandle == NULL) { + GLWin.frame = new wxFrame((wxFrame *)g_VideoInitialize.pWindowHandle, + -1, _("Dolphin"), wxPoint(0,0), size); + } else { + GLWin.frame = (wxFrame *)g_VideoInitialize.pWindowHandle; + } + GLWin.glCanvas = new wxGLCanvas(GLWin.frame, wxID_ANY, NULL, wxPoint(0,0), size, wxSUNKEN_BORDER); GLWin.glCtxt = new wxGLContext(GLWin.glCanvas);