Altered the previous commit to handle every known method of run and pause.

This commit is contained in:
ugetab 2010-05-23 16:04:13 +00:00
parent bc334c4cac
commit bf27edd686
2 changed files with 5 additions and 2 deletions

View File

@ -52,6 +52,7 @@ extern int myNumWPs;
extern int vblankScanLines;
extern int vblankPixel;
extern bool DebuggerWasUpdated;
int childwnd;
@ -61,7 +62,6 @@ int DbgSizeX=-1,DbgSizeY=-1;
int WP_edit=-1;
int ChangeWait=0,ChangeWait2=0;
uint8 debugger_open=0;
bool DebuggerWasUpdated = false;
HWND hDebug;
static HMENU hDebugcontext; //Handle to context menu
static HMENU hDebugcontextsub; //Handle to context sub menu
@ -622,6 +622,7 @@ void UpdateDebugger()
if (tmp & C_FLAG) CheckDlgButton(hDebug, IDC_DEBUGGER_FLAG_C, BST_CHECKED);
DebuggerWasUpdated = true;
}
char *BreakToText(unsigned int num) {
@ -1347,7 +1348,7 @@ BOOL CALLBACK DebuggerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
if (FCEUI_EmulationPaused()) {
UpdateRegs(hwndDlg);
FCEUI_ToggleEmulationPause();
DebuggerWasUpdated = false;
//DebuggerWasUpdated = false done in above function;
}
break;
case IDC_DEBUGGER_STEP_IN:

View File

@ -81,6 +81,7 @@ bool justLagged = false;
bool frameAdvanceLagSkip = false; //If this is true, frame advance will skip over lag frame (i.e. it will emulate 2 frames instead of 1)
bool AutoSS = false; //Flagged true when the first auto-savestate is made while a game is loaded, flagged false on game close
bool movieSubtitles = true; //Toggle for displaying movie subtitles
bool DebuggerWasUpdated = false; //To prevent the debugger from updating things without being updated.
FCEUGI::FCEUGI()
: filename(0)
@ -952,6 +953,7 @@ void FCEUI_SetEmulationPaused(int val)
void FCEUI_ToggleEmulationPause(void)
{
EmulationPaused = (EmulationPaused&1)^1;
DebuggerWasUpdated = false;
}
void FCEUI_FrameAdvanceEnd(void)