diff --git a/desmume/src/armcpu.cpp b/desmume/src/armcpu.cpp index db41d72ee..117116366 100644 --- a/desmume/src/armcpu.cpp +++ b/desmume/src/armcpu.cpp @@ -495,6 +495,7 @@ armcpu_flagIrq( armcpu_t *armcpu) { } +bool fastFetchExecute = true; template u32 armcpu_exec() { @@ -521,7 +522,7 @@ u32 armcpu_exec() cFetch = armcpu_prefetch(&ARMPROC); if (ARMPROC.stalled) { - return std::max(cFetch, cExecute); + return fastFetchExecute ? std::max(cFetch, cExecute) : (cFetch + cExecute); } #endif @@ -553,7 +554,7 @@ u32 armcpu_exec() #else cFetch = armcpu_prefetch(); #endif - return std::max(cFetch, cExecute); + return fastFetchExecute ? std::max(cFetch, cExecute) : (cFetch + cExecute); } if(PROCNUM==0) @@ -569,7 +570,7 @@ u32 armcpu_exec() #else cFetch = armcpu_prefetch(); #endif - return std::max(cFetch, cExecute); + return fastFetchExecute ? std::max(cFetch, cExecute) : (cFetch + cExecute); } //these templates needed to be instantiated manually diff --git a/desmume/src/windows/main.cpp b/desmume/src/windows/main.cpp index 01ec476c7..6af9a5682 100644 --- a/desmume/src/windows/main.cpp +++ b/desmume/src/windows/main.cpp @@ -219,6 +219,8 @@ static bool lostFocusPause = true; static bool lastPauseFromLostFocus = false; static bool FrameLimit = true; +extern bool fastFetchExecute; // from armcpu.cpp + std::vector LuaScriptHWnds; LRESULT CALLBACK LuaScriptProc(HWND, UINT, WPARAM, LPARAM); @@ -3050,6 +3052,8 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM //Gray the recent ROM menu item if there are no recent ROMs DesEnableMenuItem(mainMenu, ID_FILE_RECENTROM, RecentRoms.size()>0); + DesEnableMenuItem(mainMenu, IDC_FASTFETCHEXECUTE, movieMode == MOVIEMODE_INACTIVE); + //Updated Checked menu items //Pause @@ -3121,8 +3125,8 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM MainWindow->checkMenu(IDC_STATEREWINDING, staterewindingenabled == 1 ); - //Language selection MainWindow->checkMenu(IDC_BACKGROUNDPAUSE, lostFocusPause); + MainWindow->checkMenu(IDC_FASTFETCHEXECUTE, fastFetchExecute); //Save type const int savelist[] = {IDC_SAVETYPE1,IDC_SAVETYPE2,IDC_SAVETYPE3,IDC_SAVETYPE4,IDC_SAVETYPE5,IDC_SAVETYPE6,IDC_SAVETYPE7}; @@ -4096,6 +4100,10 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM WritePrivateProfileInt("Focus", "BackgroundPause", (int)lostFocusPause, IniName); return 0; + case IDC_FASTFETCHEXECUTE: + fastFetchExecute = !fastFetchExecute; + return 0; + case IDC_SAVETYPE1: backup_setManualBackupType(0); return 0; case IDC_SAVETYPE2: backup_setManualBackupType(1); return 0; case IDC_SAVETYPE3: backup_setManualBackupType(2); return 0; diff --git a/desmume/src/windows/resource.h b/desmume/src/windows/resource.h index c9d37536b..00d54eedb 100644 --- a/desmume/src/windows/resource.h +++ b/desmume/src/windows/resource.h @@ -812,6 +812,7 @@ #define IDC_HKCOMBO 60077 #define IDD_KEYCUSTOM 60078 #define IDM_HOTKEY_CONFIG 60079 +#define IDC_FASTFETCHEXECUTE 60080 // Next default values for new objects // diff --git a/desmume/src/windows/resources.rc b/desmume/src/windows/resources.rc index 7642d091e..e7b9dfae3 100644 Binary files a/desmume/src/windows/resources.rc and b/desmume/src/windows/resources.rc differ