mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
GUI/OpenGL: Video debugging window crash fix
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4225 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -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
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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) { }
|
||||
|
Reference in New Issue
Block a user