From 5f0ac1db68617ac8dd6cfc80afe77acf9c2c1c71 Mon Sep 17 00:00:00 2001 From: "XTra.KrazzY" Date: Sat, 18 Apr 2009 19:06:47 +0000 Subject: [PATCH] Fixed the DSP LLE debugger, it also automatically shows the disassembly on image load. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2998 8ced0084-cf51-0410-be5f-012b33b47a6e --- .../Plugin_DSP_LLE/Plugin_DSP_LLE.vcproj | 6 +----- .../Plugin_DSP_LLE/Src/Debugger/Debugger.cpp | 4 +--- .../Plugin_DSP_LLE/Src/Debugger/Debugger.h | 2 +- Source/Plugins/Plugin_DSP_LLE/Src/main.cpp | 17 ++++++++++++++--- 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/Source/Plugins/Plugin_DSP_LLE/Plugin_DSP_LLE.vcproj b/Source/Plugins/Plugin_DSP_LLE/Plugin_DSP_LLE.vcproj index d3e43db09f..f39699d234 100644 --- a/Source/Plugins/Plugin_DSP_LLE/Plugin_DSP_LLE.vcproj +++ b/Source/Plugins/Plugin_DSP_LLE/Plugin_DSP_LLE.vcproj @@ -1,7 +1,7 @@ - - diff --git a/Source/Plugins/Plugin_DSP_LLE/Src/Debugger/Debugger.cpp b/Source/Plugins/Plugin_DSP_LLE/Src/Debugger/Debugger.cpp index 79b72288f5..362d4dc644 100644 --- a/Source/Plugins/Plugin_DSP_LLE/Src/Debugger/Debugger.cpp +++ b/Source/Plugins/Plugin_DSP_LLE/Src/Debugger/Debugger.cpp @@ -93,8 +93,7 @@ void DSPDebuggerLLE::CreateGUIControls() void DSPDebuggerLLE::OnClose(wxCloseEvent& event) { - wxWindow::Destroy(); - event.Skip(); + Hide(); } void DSPDebuggerLLE::OnChangeState(wxCommandEvent& event) @@ -218,7 +217,6 @@ void DSPDebuggerLLE::RebuildDisAsmListView() char Temp2[256]; sprintf(Temp2, "0x%04x", dsp_imem_read(CurrentPC)); - AssemblerSettings settings; DSPDisassembler disasm(settings); std::string op_str; disasm.DisOpcode(binbuf, 2, &settings.pc, &op_str); diff --git a/Source/Plugins/Plugin_DSP_LLE/Src/Debugger/Debugger.h b/Source/Plugins/Plugin_DSP_LLE/Src/Debugger/Debugger.h index b62c0c0111..f88b29d36b 100644 --- a/Source/Plugins/Plugin_DSP_LLE/Src/Debugger/Debugger.h +++ b/Source/Plugins/Plugin_DSP_LLE/Src/Debugger/Debugger.h @@ -54,6 +54,7 @@ public: bool CanDoStep(); void DebugBreak(); + void Refresh(); private: DECLARE_EVENT_TABLE(); @@ -153,7 +154,6 @@ private: void OnDoubleClick(wxListEvent& event); void CreateGUIControls(); - void Refresh(); void FocusOnPC(); void UnselectAll(); }; diff --git a/Source/Plugins/Plugin_DSP_LLE/Src/main.cpp b/Source/Plugins/Plugin_DSP_LLE/Src/main.cpp index b88e79b1af..d96676abb4 100644 --- a/Source/Plugins/Plugin_DSP_LLE/Src/main.cpp +++ b/Source/Plugins/Plugin_DSP_LLE/Src/main.cpp @@ -162,8 +162,13 @@ void DoState(unsigned char **ptr, int mode) void DllDebugger(HWND _hParent, bool Show) { #if defined(HAVE_WX) && HAVE_WX - DSPDebuggerLLE *debugger = new DSPDebuggerLLE(NULL); - debugger->Show(); + if(!m_DebuggerFrame) + m_DebuggerFrame = new DSPDebuggerLLE(NULL); + + if(Show) + m_DebuggerFrame->Show(); + else + m_DebuggerFrame->Hide(); #endif } @@ -181,7 +186,8 @@ THREAD_RETURN dsp_thread(void* lpParameter) void DSP_DebugBreak() { #if defined(HAVE_WX) && HAVE_WX - m_DebuggerFrame->DebugBreak(); + if(m_DebuggerFrame) + m_DebuggerFrame->DebugBreak(); #endif } @@ -233,6 +239,11 @@ void Initialize(void *init) g_hDSPThread = new Common::Thread(dsp_thread, NULL); } soundStream = AudioCommon::InitSoundStream(); + +#if defined(HAVE_WX) && HAVE_WX + if(m_DebuggerFrame) + m_DebuggerFrame->Refresh(); +#endif } void DSP_StopSoundStream()