diff --git a/src/drivers/win/debugger.cpp b/src/drivers/win/debugger.cpp index 30275e52..35d08982 100644 --- a/src/drivers/win/debugger.cpp +++ b/src/drivers/win/debugger.cpp @@ -2200,7 +2200,7 @@ BOOL CALLBACK DebuggerCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPara //mbg merge 7/18/06 changed pausing check and set if (FCEUI_EmulationPaused()) { UpdateRegs(hwndDlg); - FCEUI_SetEmulationPaused(0); + FCEUI_ToggleEmulationPause(); //DebuggerWasUpdated = false done in above function; } break; diff --git a/src/fceu.cpp b/src/fceu.cpp index d7129f7f..a375de24 100644 --- a/src/fceu.cpp +++ b/src/fceu.cpp @@ -112,7 +112,6 @@ bool movieSubtitles = true; //Toggle for displaying movie subtitles bool DebuggerWasUpdated = false; //To prevent the debugger from updating things without being updated. bool AutoResumePlay = false; char romNameWhenClosingEmulator[2048] = {0}; -bool togglePausedRequested = false; //Flaged true to pause at frame boundary FCEUGI::FCEUGI() : filename(0), @@ -660,14 +659,6 @@ void FCEUI_Emulate(uint8 **pXBuf, int32 **SoundBuf, int32 *SoundBufSize, int ski JustFrameAdvanced = false; - //do pausing at frame boundary to avoid inconsistency - if (togglePausedRequested) - { - togglePausedRequested = false; - if (!frameAdvanceRequested) - EmulationPaused ^= EMULATIONPAUSED_PAUSED; - } - if (frameAdvanceRequested) { if (frameAdvance_Delay_count == 0 || frameAdvance_Delay_count >= frameAdvance_Delay) @@ -1133,7 +1124,7 @@ void FCEUI_SetEmulationPaused(int val) { void FCEUI_ToggleEmulationPause(void) { - togglePausedRequested = true;; + EmulationPaused = (EmulationPaused & EMULATIONPAUSED_PAUSED) ^ EMULATIONPAUSED_PAUSED; DebuggerWasUpdated = false; }