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 6d592f5a57..fe5591399d 100644 Binary files a/Windows/ppsspp.rc and b/Windows/ppsspp.rc differ diff --git a/Windows/resource.h b/Windows/resource.h index 2fb2a7fb35..70c7d11f9e 100644 Binary files a/Windows/resource.h and b/Windows/resource.h differ