diff --git a/src/drivers/win/archive.cpp b/src/drivers/win/archive.cpp index d4eb94e4..355378c9 100644 --- a/src/drivers/win/archive.cpp +++ b/src/drivers/win/archive.cpp @@ -277,7 +277,7 @@ public: // indicator for the open in archive dialog that if the load was canceled by the user. // TODO: Since I can't think of a better way to indicate it, hope someone could imporve it. -// bool archiveManuallyCanceled; +extern bool archiveManuallyCanceled; static BOOL CALLBACK ArchiveFileSelectorCallback(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { 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 36e43013..2b5cee6f 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 // indicator for the open in archive dialog that if the load was canceled by the user. @@ -405,6 +404,7 @@ int FDSLoad(const char *name, FCEUFILE *fp); int NSFLoad(const char *name, FCEUFILE *fp); //char lastLoadedGameName [2048] = {0,}; // hack for movie WRAM clearing on record from poweron +bool archiveManuallyCanceled; //name should be UTF-8, hopefully, or else there may be trouble FCEUGI *FCEUI_LoadGameVirtual(const char *name, int OverwriteVidMode, bool silent) @@ -668,14 +668,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) @@ -1141,7 +1133,7 @@ void FCEUI_SetEmulationPaused(int val) { void FCEUI_ToggleEmulationPause(void) { - togglePausedRequested = true;; + EmulationPaused = (EmulationPaused & EMULATIONPAUSED_PAUSED) ^ EMULATIONPAUSED_PAUSED; DebuggerWasUpdated = false; }