From abed13c3924847b14bb1111dcb1b98a7fe74e9ec Mon Sep 17 00:00:00 2001 From: zeromus Date: Fri, 22 Feb 2019 20:48:59 -0500 Subject: [PATCH] Revert "Fix for the interframe-pause-skips-updating-next-frame bugs, mostly noticeable when dumping AVIs." This reverts commit c7710ae244e9c8b01c0247a04aa702c616906bcd. fixes #39 --- src/drivers/win/debugger.cpp | 2 +- src/fceu.cpp | 11 +---------- 2 files changed, 2 insertions(+), 11 deletions(-) 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; }