diff --git a/Windows/GEDebugger/GEDebugger.cpp b/Windows/GEDebugger/GEDebugger.cpp index c5d2a930c..96e581281 100644 --- a/Windows/GEDebugger/GEDebugger.cpp +++ b/Windows/GEDebugger/GEDebugger.cpp @@ -155,11 +155,15 @@ void CGEDebugger::UpdatePreviews() { ERROR_LOG(COMMON, "Unable to get texture."); texWindow->Clear(); } + + DisplayList list; + if (gpuDebug->GetCurrentDisplayList(list)) { + CtrlDisplayListView *displayList = CtrlDisplayListView::getFrom(GetDlgItem(m_hDlg, IDC_GEDBG_CURRENTDISPLAYLIST)); + displayList->setDisplayList(list); + } } BOOL CGEDebugger::DlgProc(UINT message, WPARAM wParam, LPARAM lParam) { - CtrlDisplayListView* displayList = CtrlDisplayListView::getFrom(GetDlgItem(m_hDlg,IDC_GEDBG_CURRENTDISPLAYLIST)); - switch (message) { case WM_INITDIALOG: return TRUE; @@ -178,28 +182,29 @@ BOOL CGEDebugger::DlgProc(UINT message, WPARAM wParam, LPARAM lParam) { case WM_COMMAND: switch (LOWORD(wParam)) { - case IDC_GEDBG_BREAK: + case IDC_GEDBG_STEPDRAW: attached = true; SetupPreviews(); - DisplayList list; - // todo: for some reason this sometimes fails when hitting break - // when the core is running. then only works when stepping through - // in the debugger or when the core is already paused - if (gpuDebug->GetCurrentDisplayList(list)) { - displayList->setDisplayList(list); - } - //breakNextOp = true; pauseWait.notify_one(); + breakNextOp = false; breakNextDraw = true; - // TODO + break; + + case IDC_GEDBG_STEP: + attached = true; + SetupPreviews(); + + pauseWait.notify_one(); + breakNextOp = true; + breakNextDraw = false; break; case IDC_GEDBG_RESUME: frameWindow->Clear(); texWindow->Clear(); // TODO: detach? Should probably have separate UI, or just on activate? - //breakNextOp = false; + breakNextOp = false; breakNextDraw = false; pauseWait.notify_one(); break; diff --git a/Windows/ppsspp.rc b/Windows/ppsspp.rc index 465eefde4..1c666663c 100644 --- a/Windows/ppsspp.rc +++ b/Windows/ppsspp.rc @@ -169,8 +169,9 @@ EXSTYLE WS_EX_ACCEPTFILES | WS_EX_TOOLWINDOW CAPTION "GE" FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN - PUSHBUTTON "Break",IDC_GEDBG_BREAK,0,0,48,14 - PUSHBUTTON "Resume",IDC_GEDBG_RESUME,52,0,48,14 + PUSHBUTTON "Step Draw",IDC_GEDBG_STEPDRAW,0,0,48,14 + PUSHBUTTON "Step Into",IDC_GEDBG_STEP,52,0,48,14 + PUSHBUTTON "Resume",IDC_GEDBG_RESUME,104,0,48,14 CONTROL "",IDC_GEDBG_TEX,"SimpleGLWindow",WS_CHILD | WS_VISIBLE,10,20,128,128 CONTROL "",IDC_GEDBG_FRAME,"SimpleGLWindow",WS_CHILD | WS_VISIBLE,148,20,256,136 CONTROL "",IDC_GEDBG_CURRENTDISPLAYLIST,"CtrlDisplayListView",WS_BORDER | WS_VISIBLE,10,195,456,200 diff --git a/Windows/resource.h b/Windows/resource.h index b5b3ac9c2..f865f9174 100644 --- a/Windows/resource.h +++ b/Windows/resource.h @@ -259,11 +259,12 @@ #define ID_OPTIONS_SCREEN9X 40114 #define ID_OPTIONS_SCREEN10X 40115 #define ID_DEBUG_GEDEBUGGER 40116 -#define IDC_GEDBG_BREAK 40117 +#define IDC_GEDBG_STEPDRAW 40117 #define IDC_GEDBG_RESUME 40118 #define IDC_GEDBG_FRAME 40119 #define IDC_GEDBG_CURRENTDISPLAYLIST 40120 #define IDC_GEDBG_TEX 40121 +#define IDC_GEDBG_STEP 40122 // Dummy option to let the buffered rendering hotkey cycle through all the options. #define ID_OPTIONS_BUFFEREDRENDERINGDUMMY 40500 @@ -276,7 +277,7 @@ #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 251 -#define _APS_NEXT_COMMAND_VALUE 40122 +#define _APS_NEXT_COMMAND_VALUE 40123 #define _APS_NEXT_CONTROL_VALUE 1181 #define _APS_NEXT_SYMED_VALUE 101 #endif