From 177b9fa6b1931440c31baa1e25bee14199f3f928 Mon Sep 17 00:00:00 2001 From: Kingcom Date: Wed, 14 Aug 2013 23:30:50 +0200 Subject: [PATCH] Separate accelerator table when the debugger is active --- Windows/Debugger/Debugger_Disasm.cpp | 8 ++++++++ Windows/Globals.cpp | 1 + Windows/main.cpp | 3 ++- Windows/main.h | 3 ++- Windows/ppsspp.rc | Bin 40202 -> 40416 bytes Windows/resource.h | Bin 21952 -> 22042 bytes 6 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Windows/Debugger/Debugger_Disasm.cpp b/Windows/Debugger/Debugger_Disasm.cpp index c0b592f8eb..27d1ccebcf 100644 --- a/Windows/Debugger/Debugger_Disasm.cpp +++ b/Windows/Debugger/Debugger_Disasm.cpp @@ -587,6 +587,14 @@ BOOL CDisasm::DlgProc(UINT message, WPARAM wParam, LPARAM lParam) case WM_CLOSE: Show(false); return TRUE; + case WM_ACTIVATE: + if (wParam == WA_ACTIVE || wParam == WA_CLICKACTIVE) + { + g_debuggerActive = true; + } else { + g_debuggerActive = false; + } + break; } return FALSE; } diff --git a/Windows/Globals.cpp b/Windows/Globals.cpp index 1344fc94f4..36ed0137f6 100644 --- a/Windows/Globals.cpp +++ b/Windows/Globals.cpp @@ -24,5 +24,6 @@ // Globals HMENU g_hPopupMenus; +bool g_debuggerActive = false; #endif diff --git a/Windows/main.cpp b/Windows/main.cpp index b16f1d83e8..4e76933d43 100644 --- a/Windows/main.cpp +++ b/Windows/main.cpp @@ -124,6 +124,7 @@ int WINAPI WinMain(HINSTANCE _hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLin EmuThread_Start(); HACCEL hAccelTable = LoadAccelerators(_hInstance, (LPCTSTR)IDR_ACCELS); + HACCEL hDebugAccelTable = LoadAccelerators(_hInstance, (LPCTSTR)IDR_DEBUGACCELS); //so.. we're at the message pump of the GUI thread for (MSG msg; GetMessage(&msg, NULL, 0, 0); ) // for no quit @@ -141,7 +142,7 @@ int WINAPI WinMain(HINSTANCE _hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLin } //Translate accelerators and dialog messages... - if (!TranslateAccelerator(hwndMain, hAccelTable, &msg)) + if (!TranslateAccelerator(hwndMain, g_debuggerActive ? hDebugAccelTable : hAccelTable, &msg)) { if (!DialogManager::IsDialogMessage(&msg)) { diff --git a/Windows/main.h b/Windows/main.h index 2467aef030..f513292c27 100644 --- a/Windows/main.h +++ b/Windows/main.h @@ -28,4 +28,5 @@ extern CDisasm *disasmWindow[MAX_CPUCOUNT]; extern CMemoryDlg *memoryWindow[MAX_CPUCOUNT]; -extern HMENU g_hPopupMenus; \ No newline at end of file +extern HMENU g_hPopupMenus; +extern bool g_debuggerActive; \ No newline at end of file diff --git a/Windows/ppsspp.rc b/Windows/ppsspp.rc index 6d592f5a57a2786d6e27ff896436b7f82a32e6c7..fe5591399dda95e856da1244f00f98674a79cfae 100644 GIT binary patch delta 56 zcmeC$#q?k|(}s6Kf}RX63_%R>K+=`Li6NB1eR42|$~MHV3`{