mirror of
https://github.com/libretro/ppsspp.git
synced 2025-02-15 14:40:20 +00:00
Merge pull request #3172 from Kingcom/Debug
Separate accelerator table when the debugger is active
This commit is contained in:
commit
9aafdeafcf
@ -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;
|
||||
@ -587,6 +591,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;
|
||||
}
|
||||
|
@ -24,5 +24,6 @@
|
||||
|
||||
// Globals
|
||||
HMENU g_hPopupMenus;
|
||||
bool g_debuggerActive = false;
|
||||
#endif
|
||||
|
||||
|
@ -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,18 @@ int WINAPI WinMain(HINSTANCE _hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLin
|
||||
}
|
||||
|
||||
//Translate accelerators and dialog messages...
|
||||
if (!TranslateAccelerator(hwndMain, 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))
|
||||
{
|
||||
|
@ -28,4 +28,5 @@
|
||||
extern CDisasm *disasmWindow[MAX_CPUCOUNT];
|
||||
extern CMemoryDlg *memoryWindow[MAX_CPUCOUNT];
|
||||
|
||||
extern HMENU g_hPopupMenus;
|
||||
extern HMENU g_hPopupMenus;
|
||||
extern bool g_debuggerActive;
|
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user