From 95d76c66413ae934949baf637ffa1650e90912ab Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 16 Nov 2013 01:42:24 -0800 Subject: [PATCH] Detach the GE debugger on close. And attach in a few missing places, clean up a few comments. --- Windows/GEDebugger/GEDebugger.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Windows/GEDebugger/GEDebugger.cpp b/Windows/GEDebugger/GEDebugger.cpp index edcf20903c..4c974e1cef 100644 --- a/Windows/GEDebugger/GEDebugger.cpp +++ b/Windows/GEDebugger/GEDebugger.cpp @@ -71,7 +71,6 @@ CGEDebugger::CGEDebugger(HINSTANCE _hInstance, HWND _hParent) // it's ugly, but .rc coordinates don't match actual pixels and it screws // up both the size and the aspect ratio - // TODO: Could be scrollable in case the framebuf is larger? Also should be better positioned. RECT frameRect; HWND frameWnd = GetDlgItem(m_hDlg,IDC_GEDBG_FRAME); @@ -140,8 +139,6 @@ void CGEDebugger::SetupPreviews() { } void CGEDebugger::UpdatePreviews() { - // TODO: Do something different if not paused? - wchar_t desc[256]; const GPUDebugBuffer *primaryBuffer = NULL; bool bufferResult = false; @@ -288,6 +285,10 @@ BOOL CGEDebugger::DlgProc(UINT message, WPARAM wParam, LPARAM lParam) { return TRUE; case WM_CLOSE: + attached = false; + ResumeFromStepping(); + breakNext = BREAK_NONE; + Show(false); return TRUE; @@ -309,7 +310,6 @@ BOOL CGEDebugger::DlgProc(UINT message, WPARAM wParam, LPARAM lParam) { break; case IDC_GEDBG_FBTABS: fbTabs->HandleNotify(lParam); - // TODO: Move this somewhere... if (attached && gpuDebug != NULL) { UpdatePreviews(); } @@ -345,6 +345,7 @@ BOOL CGEDebugger::DlgProc(UINT message, WPARAM wParam, LPARAM lParam) { case IDC_GEDBG_BREAKTEX: { + attached = true; if (!gpuDebug) { break; } @@ -367,7 +368,6 @@ BOOL CGEDebugger::DlgProc(UINT message, WPARAM wParam, LPARAM lParam) { SetDlgItemText(m_hDlg, IDC_GEDBG_FRAMEBUFADDR, L""); SetDlgItemText(m_hDlg, IDC_GEDBG_TEXADDR, L""); - // TODO: detach? Should probably have separate UI, or just on activate? ResumeFromStepping(); breakNext = BREAK_NONE; break; @@ -397,6 +397,7 @@ BOOL CGEDebugger::DlgProc(UINT message, WPARAM wParam, LPARAM lParam) { case WM_GEDBG_TOGGLEPCBREAKPOINT: { + attached = true; u32 pc = (u32)wParam; bool temp; bool isBreak = IsAddressBreakpoint(pc, temp); @@ -410,6 +411,7 @@ BOOL CGEDebugger::DlgProc(UINT message, WPARAM wParam, LPARAM lParam) { case WM_GEDBG_RUNTOWPARAM: { + attached = true; u32 pc = (u32)wParam; AddAddressBreakpoint(pc, true); SendMessage(m_hDlg,WM_COMMAND,IDC_GEDBG_RESUME,0);