mirror of
https://github.com/libretro/ppsspp.git
synced 2024-11-24 08:39:51 +00:00
-Step through display list with F10/F11
-accelerator changes
This commit is contained in:
parent
4a786ebef8
commit
513223ea4f
@ -708,9 +708,7 @@ BOOL CDisasm::DlgProc(UINT message, WPARAM wParam, LPARAM lParam)
|
||||
case WM_ACTIVATE:
|
||||
if (wParam == WA_ACTIVE || wParam == WA_CLICKACTIVE)
|
||||
{
|
||||
g_debuggerActive = true;
|
||||
} else {
|
||||
g_debuggerActive = false;
|
||||
g_activeWindow = WINDOW_CPUDEBUGGER;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include "Windows/GEDebugger/CtrlDisplayListView.h"
|
||||
#include "Core/Config.h"
|
||||
#include "Windows/GEDebugger/GEDebugger.h"
|
||||
|
||||
const PTCHAR CtrlDisplayListView::windowClass = _T("CtrlDisplayListView");
|
||||
|
||||
@ -98,8 +99,9 @@ LRESULT CALLBACK CtrlDisplayListView::wndProc(HWND hwnd, UINT msg, WPARAM wParam
|
||||
win->onMouseDown(wParam,lParam,1);
|
||||
break;
|
||||
case WM_KEYDOWN:
|
||||
case WM_SYSKEYDOWN:
|
||||
win->onKeyDown(wParam,lParam);
|
||||
break;
|
||||
return 0;
|
||||
case WM_GETDLGCODE:
|
||||
if (lParam && ((MSG*)lParam)->message == WM_KEYDOWN)
|
||||
{
|
||||
@ -290,6 +292,10 @@ void CtrlDisplayListView::onKeyDown(WPARAM wParam, LPARAM lParam)
|
||||
case VK_LEFT:
|
||||
gotoAddr(list.pc);
|
||||
return;
|
||||
case VK_F10:
|
||||
case VK_F11:
|
||||
SendMessage(GetParent(wnd),WM_GEDBG_STEPDISPLAYLIST,0,0);
|
||||
break;
|
||||
}
|
||||
redraw();
|
||||
}
|
||||
|
@ -32,9 +32,6 @@
|
||||
#include <windowsx.h>
|
||||
#include <commctrl.h>
|
||||
|
||||
const UINT WM_GEDBG_BREAK_CMD = WM_USER + 200;
|
||||
const UINT WM_GEDBG_BREAK_DRAW = WM_USER + 201;
|
||||
|
||||
enum PauseAction {
|
||||
PAUSE_CONTINUE,
|
||||
PAUSE_GETFRAMEBUF,
|
||||
@ -252,6 +249,12 @@ BOOL CGEDebugger::DlgProc(UINT message, WPARAM wParam, LPARAM lParam) {
|
||||
SetupPreviews();
|
||||
break;
|
||||
|
||||
case WM_ACTIVATE:
|
||||
if (wParam == WA_ACTIVE || wParam == WA_CLICKACTIVE) {
|
||||
g_activeWindow = WINDOW_GEDEBUGGER;
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_NOTIFY:
|
||||
switch (wParam)
|
||||
{
|
||||
@ -282,12 +285,7 @@ BOOL CGEDebugger::DlgProc(UINT message, WPARAM wParam, LPARAM lParam) {
|
||||
break;
|
||||
|
||||
case IDC_GEDBG_STEP:
|
||||
attached = true;
|
||||
SetupPreviews();
|
||||
|
||||
pauseWait.notify_one();
|
||||
breakNextOp = true;
|
||||
breakNextDraw = false;
|
||||
SendMessage(m_hDlg,WM_GEDBG_STEPDISPLAYLIST,0,0);
|
||||
break;
|
||||
|
||||
case IDC_GEDBG_RESUME:
|
||||
@ -316,6 +314,15 @@ BOOL CGEDebugger::DlgProc(UINT message, WPARAM wParam, LPARAM lParam) {
|
||||
UpdatePreviews();
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_GEDBG_STEPDISPLAYLIST:
|
||||
attached = true;
|
||||
SetupPreviews();
|
||||
|
||||
pauseWait.notify_one();
|
||||
breakNextOp = true;
|
||||
breakNextDraw = false;
|
||||
break;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
|
@ -23,6 +23,12 @@
|
||||
#include "Windows/W32Util/DialogManager.h"
|
||||
#include "Windows/GEDebugger/SimpleGLWindow.h"
|
||||
|
||||
enum {
|
||||
WM_GEDBG_BREAK_CMD = WM_USER + 200,
|
||||
WM_GEDBG_BREAK_DRAW,
|
||||
WM_GEDBG_STEPDISPLAYLIST,
|
||||
};
|
||||
|
||||
class CtrlDisplayListView;
|
||||
|
||||
class CGEDebugger : public Dialog {
|
||||
|
@ -24,6 +24,6 @@
|
||||
|
||||
// Globals
|
||||
HMENU g_hPopupMenus;
|
||||
bool g_debuggerActive = false;
|
||||
int g_activeWindow = 0;
|
||||
#endif
|
||||
|
||||
|
@ -838,6 +838,9 @@ namespace MainWindow
|
||||
|
||||
switch (message) {
|
||||
case WM_ACTIVATE:
|
||||
if (wParam == WA_ACTIVE || wParam == WA_CLICKACTIVE) {
|
||||
g_activeWindow = WINDOW_MAINWINDOW;
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_SETFOCUS:
|
||||
@ -998,6 +1001,12 @@ namespace MainWindow
|
||||
case WM_CREATE:
|
||||
break;
|
||||
|
||||
case WM_ACTIVATE:
|
||||
if (wParam == WA_ACTIVE || wParam == WA_CLICKACTIVE) {
|
||||
g_activeWindow = WINDOW_MAINWINDOW;
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_MOVE:
|
||||
SavePosition();
|
||||
ResizeDisplay(false);
|
||||
|
@ -224,12 +224,21 @@ int WINAPI WinMain(HINSTANCE _hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLin
|
||||
//Translate accelerators and dialog messages...
|
||||
HWND wnd;
|
||||
HACCEL accel;
|
||||
if (g_debuggerActive) {
|
||||
wnd = disasmWindow[0]->GetDlgHandle();
|
||||
accel = hDebugAccelTable;
|
||||
} else {
|
||||
switch (g_activeWindow)
|
||||
{
|
||||
case WINDOW_MAINWINDOW:
|
||||
wnd = hwndMain;
|
||||
accel = hAccelTable;
|
||||
break;
|
||||
case WINDOW_CPUDEBUGGER:
|
||||
wnd = disasmWindow[0]->GetDlgHandle();
|
||||
accel = hDebugAccelTable;
|
||||
break;
|
||||
case WINDOW_GEDEBUGGER:
|
||||
default:
|
||||
wnd = 0;
|
||||
accel = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!TranslateAccelerator(wnd, accel, &msg))
|
||||
|
@ -31,4 +31,6 @@ extern CGEDebugger *geDebuggerWindow ;
|
||||
extern CMemoryDlg *memoryWindow[MAX_CPUCOUNT];
|
||||
|
||||
extern HMENU g_hPopupMenus;
|
||||
extern bool g_debuggerActive;
|
||||
extern int g_activeWindow;
|
||||
|
||||
enum { WINDOW_MAINWINDOW, WINDOW_CPUDEBUGGER, WINDOW_GEDEBUGGER };
|
Loading…
Reference in New Issue
Block a user