From 2c66b9d36f9bc95acd0e6e87e12f4f360c7c4d6f Mon Sep 17 00:00:00 2001 From: nakeee Date: Sat, 13 Dec 2008 22:40:10 +0000 Subject: [PATCH] wxgl fixes git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1524 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/DolphinWX/Src/Frame.h | 10 ++++++++-- Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp | 5 +++-- Source/Plugins/Plugin_VideoOGL/Src/main.cpp | 5 +++++ 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/Source/Core/DolphinWX/Src/Frame.h b/Source/Core/DolphinWX/Src/Frame.h index 5402526abe..139af96274 100644 --- a/Source/Core/DolphinWX/Src/Frame.h +++ b/Source/Core/DolphinWX/Src/Frame.h @@ -10,12 +10,18 @@ class CFrame : public wxFrame CFrame(wxFrame* parent, wxWindowID id = wxID_ANY, - const wxString& title = _T("Dolphin"), + const wxString& title = wxT("Dolphin"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE | wxNO_FULL_REPAINT_ON_RESIZE); - void* GetRenderHandle() {return(m_Panel->GetHandle());} + void* GetRenderHandle() { +#ifdef _WIN32 + return(m_Panel->GetHandle()); +#else + return this; +#endif + } wxStatusBar* m_pStatusBar; diff --git a/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp b/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp index f445e4c3ad..f882d415f6 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp @@ -212,10 +212,11 @@ bool OpenGL_Create(SVideoInitialize &_VideoInitialize, int _iwidth, int _iheight wxSize size(_iwidth, _iheight); if (!g_Config.renderToMainframe || g_VideoInitialize.pWindowHandle == NULL) { - GLWin.frame = new wxFrame((wxFrame *)g_VideoInitialize.pWindowHandle, + GLWin.frame = new wxFrame((wxWindow *)g_VideoInitialize.pWindowHandle, -1, _("Dolphin"), wxPoint(0,0), size); } else { - GLWin.frame = (wxFrame *)g_VideoInitialize.pWindowHandle; + GLWin.frame = new wxFrame((wxWindow *)NULL, + -1, _("Dolphin"), wxPoint(0,0), size); } GLWin.glCanvas = new wxGLCanvas(GLWin.frame, wxID_ANY, NULL, wxPoint(0,0), size, wxSUNKEN_BORDER); diff --git a/Source/Plugins/Plugin_VideoOGL/Src/main.cpp b/Source/Plugins/Plugin_VideoOGL/Src/main.cpp index ce17d19ace..96ba782855 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/main.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/main.cpp @@ -153,7 +153,12 @@ void DllConfig(HWND _hParent) //frame.ShowModal(); frame->ShowModal(); //win.SetHWND(0); +#elif defined(USE_WX) && USE_WX + ConfigDialog frame(NULL); + g_Config.Load(); + frame.ShowModal() +; #elif defined(HAVE_X11) && HAVE_X11 #if defined(HAVE_XXF86VM) && HAVE_XXF86VM ConfigDialog frame(NULL);