From 271815d60e154ea99d137a5bda327b0e3914ee20 Mon Sep 17 00:00:00 2001 From: ugetab Date: Fri, 28 May 2010 16:45:57 +0000 Subject: [PATCH] Updated the code for the last commit. I added it rather in a bit of a hurry, but didn't account for a few things. Should work well enough now. --- src/drivers/win/debugger.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/drivers/win/debugger.cpp b/src/drivers/win/debugger.cpp index 8bd2adc8..d243cd0b 100644 --- a/src/drivers/win/debugger.cpp +++ b/src/drivers/win/debugger.cpp @@ -1075,11 +1075,6 @@ BOOL CALLBACK DebuggerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara inDebugger = true; break; } - case WM_ACTIVATE: { - //Prevents numerous situations where the debugger is out of date with the data - UpdateDebugger(); - break; - } case WM_SIZE: { if(wParam == SIZE_RESTORED) //If dialog was resized { @@ -1151,6 +1146,17 @@ BOOL CALLBACK DebuggerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara //these messages only get handled when a game is loaded if (GameInfo) { switch(uMsg) { + case WM_ACTIVATE: { + //Prevents numerous situations where the debugger is out of date with the data + if (wParam != WA_INACTIVE) + UpdateDebugger(); + else { + if (FCEUI_EmulationPaused()) + UpdateRegs(hwndDlg); + } + + break; + } case WM_VSCROLL: //mbg merge 7/18/06 changed pausing check if (FCEUI_EmulationPaused()) UpdateRegs(hwndDlg);