summaryrefslogtreecommitdiff
path: root/Source/Plugins
diff options
context:
space:
mode:
authorJohn Peterson <jpeterson57@gmail.com>2009-09-07 13:33:40 +0000
committerJohn Peterson <jpeterson57@gmail.com>2009-09-07 13:33:40 +0000
commit24d68da653b6def668ff6946586e60f94aa082af (patch)
tree3eb228e226d3f76fa29772f45f3d2714aa58ad11 /Source/Plugins
parent7dffe43eaa148720f78f8b35709c226f5c1b3ef8 (diff)
GUI/OpenGL: Video debugging window crash fix
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4225 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Plugins')
-rw-r--r--Source/Plugins/Plugin_VideoOGL/Src/Debugger/Debugger.cpp9
-rw-r--r--Source/Plugins/Plugin_VideoOGL/Src/Globals.h6
-rw-r--r--Source/Plugins/Plugin_VideoOGL/Src/main.cpp12
3 files changed, 21 insertions, 6 deletions
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Debugger/Debugger.cpp b/Source/Plugins/Plugin_VideoOGL/Src/Debugger/Debugger.cpp
index b2819eafcb..0af54775d2 100644
--- a/Source/Plugins/Plugin_VideoOGL/Src/Debugger/Debugger.cpp
+++ b/Source/Plugins/Plugin_VideoOGL/Src/Debugger/Debugger.cpp
@@ -46,15 +46,20 @@ GFXDebuggerOGL::GFXDebuggerOGL(wxWindow *parent, wxWindowID id, const wxString &
GFXDebuggerOGL::~GFXDebuggerOGL()
{
SaveSettings();
+ m_DebuggerFrame = NULL;
NOTICE_LOG(CONSOLE, "Stop [Video Thread]: Closing OpenGL debugging window");
}
void GFXDebuggerOGL::OnClose(wxCloseEvent& event)
{
- // save the window position when we hide the window
+ // This means wxDialog's Destroy is used
+ //event.Skip();
+
+ // Save the window position
SaveSettings();
- event.Skip(); // This means wxDialog's Destroy is used
+ // Destroy
+ delete this;
}
void GFXDebuggerOGL::SaveSettings() const
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Globals.h b/Source/Plugins/Plugin_VideoOGL/Src/Globals.h
index 3da9fc54ce..7bd62b0fb9 100644
--- a/Source/Plugins/Plugin_VideoOGL/Src/Globals.h
+++ b/Source/Plugins/Plugin_VideoOGL/Src/Globals.h
@@ -24,6 +24,12 @@
#include "VideoCommon.h"
#include "pluginspecs_video.h"
+#if defined(HAVE_WX) && HAVE_WX
+ #include "Debugger/Debugger.h"
+ class GFXDebuggerOGL;
+ extern GFXDebuggerOGL *m_DebuggerFrame;
+#endif
+
// A global plugin specification
extern PLUGIN_GLOBALS* globals;
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/main.cpp b/Source/Plugins/Plugin_VideoOGL/Src/main.cpp
index e6c2f41fb3..486ba4a185 100644
--- a/Source/Plugins/Plugin_VideoOGL/Src/main.cpp
+++ b/Source/Plugins/Plugin_VideoOGL/Src/main.cpp
@@ -154,13 +154,17 @@ wxWindow* GetParentedWxWindow(HWND Parent)
#if defined(HAVE_WX) && HAVE_WX
void DllDebugger(HWND _hParent, bool Show)
{
- if (!m_DebuggerFrame)
- m_DebuggerFrame = new GFXDebuggerOGL(GetParentedWxWindow(_hParent));
-
if (Show)
+ {
+ if (!m_DebuggerFrame)
+ m_DebuggerFrame = new GFXDebuggerOGL(NULL);
+ //m_DebuggerFrame = new GFXDebuggerOGL(GetParentedWxWindow(_hParent));
m_DebuggerFrame->Show();
+ }
else
- m_DebuggerFrame->Hide();
+ {
+ if (m_DebuggerFrame) m_DebuggerFrame->Hide();
+ }
}
#else
void DllDebugger(HWND _hParent, bool Show) { }