From bfbea62ce343b3abdf6a6994f13a0164b0657d7c Mon Sep 17 00:00:00 2001 From: Kingcom Date: Wed, 14 Aug 2013 23:46:59 +0200 Subject: [PATCH] Send messages to the debugger --- Windows/Debugger/Debugger_Disasm.cpp | 4 ++++ Windows/main.cpp | 13 ++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Windows/Debugger/Debugger_Disasm.cpp b/Windows/Debugger/Debugger_Disasm.cpp index 27d1ccebcf..3eb8a101c5 100644 --- a/Windows/Debugger/Debugger_Disasm.cpp +++ b/Windows/Debugger/Debugger_Disasm.cpp @@ -17,6 +17,7 @@ #include "Windows/Debugger/CtrlRegisterList.h" #include "Windows/Debugger/CtrlMemView.h" #include "Windows/Debugger/Debugger_Lists.h" +#include "Windows/WndMainWindow.h" #include "Core/Core.h" #include "Core/CPU.h" @@ -224,6 +225,9 @@ BOOL CDisasm::DlgProc(UINT message, WPARAM wParam, LPARAM lParam) CtrlRegisterList *reglist = CtrlRegisterList::getFrom(GetDlgItem(m_hDlg,IDC_REGLIST)); switch(LOWORD(wParam)) { + case ID_TOGGLE_PAUSE: + SendMessage(MainWindow::GetHWND(),WM_COMMAND,ID_TOGGLE_PAUSE,0); + break; case IDC_SHOWVFPU: vfpudlg->Show(true); break; diff --git a/Windows/main.cpp b/Windows/main.cpp index 4e76933d43..6c026a7895 100644 --- a/Windows/main.cpp +++ b/Windows/main.cpp @@ -142,7 +142,18 @@ int WINAPI WinMain(HINSTANCE _hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLin } //Translate accelerators and dialog messages... - if (!TranslateAccelerator(hwndMain, g_debuggerActive ? hDebugAccelTable : hAccelTable, &msg)) + HWND wnd; + HACCEL accel; + if (g_debuggerActive) + { + wnd = disasmWindow[0]->GetDlgHandle(); + accel = hDebugAccelTable; + } else { + wnd = hwndMain; + accel = hAccelTable; + } + + if (!TranslateAccelerator(wnd, accel, &msg)) { if (!DialogManager::IsDialogMessage(&msg)) {