diff --git a/Windows/Debugger/DebuggerShared.h b/Windows/Debugger/DebuggerShared.h index 97ff067275..be55ec8eb8 100644 --- a/Windows/Debugger/DebuggerShared.h +++ b/Windows/Debugger/DebuggerShared.h @@ -8,7 +8,9 @@ enum { WM_DEB_RUNTOWPARAM = WM_USER+2, WM_DEB_REMOVEBREAKPOINT, WM_DEB_GOTOADDRESSEDIT, WM_DEB_MAPLOADED, - WM_DEB_TABPRESSED + WM_DEB_TABPRESSED, + WM_DEB_SETDEBUGLPARAM, + WM_DEB_UPDATE, }; bool executeExpressionWindow(HWND hwnd, DebugInterface* cpu, u32& dest); diff --git a/Windows/Debugger/Debugger_Disasm.cpp b/Windows/Debugger/Debugger_Disasm.cpp index 2d581eab66..b8a34a62a5 100644 --- a/Windows/Debugger/Debugger_Disasm.cpp +++ b/Windows/Debugger/Debugger_Disasm.cpp @@ -784,9 +784,14 @@ BOOL CDisasm::DlgProc(UINT message, WPARAM wParam, LPARAM lParam) } break; - case WM_DISASM_SETDEBUG: + case WM_DEB_SETDEBUGLPARAM: SetDebugMode(lParam != 0); return TRUE; + + case WM_DEB_UPDATE: + Update(); + return TRUE; + case WM_DEB_TABPRESSED: { HWND bp = GetDlgItem(m_hDlg, IDC_BREAKPOINTLIST); diff --git a/Windows/Debugger/Debugger_Disasm.h b/Windows/Debugger/Debugger_Disasm.h index 163af28f47..b38d73db1e 100644 --- a/Windows/Debugger/Debugger_Disasm.h +++ b/Windows/Debugger/Debugger_Disasm.h @@ -14,9 +14,6 @@ #include -// Takes lParam for debug mode, zero or non zero. -const int WM_DISASM_SETDEBUG = WM_APP + 0; - class CtrlThreadList; class CDisasm : public Dialog diff --git a/Windows/Debugger/Debugger_MemoryDlg.cpp b/Windows/Debugger/Debugger_MemoryDlg.cpp index 18bd81376b..292a891777 100644 --- a/Windows/Debugger/Debugger_MemoryDlg.cpp +++ b/Windows/Debugger/Debugger_MemoryDlg.cpp @@ -177,6 +177,11 @@ BOOL CMemoryDlg::DlgProc(UINT message, WPARAM wParam, LPARAM lParam) } break; } + + case WM_DEB_UPDATE: + Update(); + return TRUE; + case WM_INITDIALOG: { return TRUE; diff --git a/Windows/WindowsHost.cpp b/Windows/WindowsHost.cpp index 77dd9d8760..7bf05e021e 100644 --- a/Windows/WindowsHost.cpp +++ b/Windows/WindowsHost.cpp @@ -25,9 +25,10 @@ #include "WndMainWindow.h" #include "OpenGLBase.h" -#include "../Windows/Debugger/Debugger_Disasm.h" -#include "../Windows/Debugger/Debugger_MemoryDlg.h" -#include "../Core/Debugger/SymbolMap.h" +#include "Windows/Debugger/DebuggerShared.h" +#include "Windows/Debugger/Debugger_Disasm.h" +#include "Windows/Debugger/Debugger_MemoryDlg.h" +#include "Core/Debugger/SymbolMap.h" #include "main.h" @@ -45,6 +46,11 @@ int MyMix(short *buffer, int numSamples, int bits, int rate, int channels) } } +static BOOL PostDialogMessage(Dialog *dialog, UINT message, WPARAM wParam = 0, LPARAM lParam = 0) +{ + return PostMessage(dialog->GetDlgHandle(), message, wParam, lParam); +} + bool WindowsHost::InitGL(std::string *error_message) { return GL_Init(MainWindow::GetDisplayHWND(), error_message); @@ -112,14 +118,14 @@ void WindowsHost::UpdateMemView() { for (int i=0; iUpdate(); + PostDialogMessage(memoryWindow[i], WM_DEB_UPDATE); } void WindowsHost::UpdateDisassembly() { for (int i=0; iUpdate(); + PostDialogMessage(disasmWindow[i], WM_DEB_UPDATE); } void WindowsHost::SetDebugMode(bool mode) @@ -127,7 +133,7 @@ void WindowsHost::SetDebugMode(bool mode) for (int i = 0; i < numCPUs; i++) { if (disasmWindow[i]) - PostMessage(disasmWindow[i]->GetDlgHandle(), WM_DISASM_SETDEBUG, 0, (LPARAM)mode); + PostDialogMessage(disasmWindow[i], WM_DEB_SETDEBUGLPARAM, 0, (LPARAM)mode); } }