diff --git a/Core/CoreTiming.cpp b/Core/CoreTiming.cpp index 78ca1d2fb8c8..507de8845783 100644 --- a/Core/CoreTiming.cpp +++ b/Core/CoreTiming.cpp @@ -123,7 +123,7 @@ u64 GetGlobalTimeUsScaled() float vps; __DisplayGetVPS(&vps); if (vps > 4.0f) - freq *= (vps / 59.94f); + freq *= (vps / (g_Config.bRefreshAt60Hz ? 60.0f : 59.94f)); } s64 usSinceLast = ticksSinceLast / freq; return lastGlobalTimeUs + usSinceLast; diff --git a/Core/HLE/sceDisplay.cpp b/Core/HLE/sceDisplay.cpp index 5e4977479b5e..0b2bacbec881 100644 --- a/Core/HLE/sceDisplay.cpp +++ b/Core/HLE/sceDisplay.cpp @@ -109,7 +109,7 @@ static bool wasPaused; static bool flippedThisFrame; // 1.001f to compensate for the classic 59.94 NTSC framerate that the PSP seems to have. -static const double timePerVblank = 1.001f / 60.0f; +static const double timePerVblank = (g_Config.bRefreshAt60Hz ? 1.0f : 1.001f) / 60.0f; // Don't include this in the state, time increases regardless of state. static double curFrameTime; @@ -528,8 +528,6 @@ static void DoFrameTiming(bool &throttle, bool &skipFrame, float timestep) { time_update(); float scaledTimestep = timestep; - if (g_Config.bRefreshAt60Hz) - scaledTimestep = scaledTimestep * 1.001f; if (fpsLimiter == FPS_LIMIT_CUSTOM && g_Config.iFpsLimit != 0) { scaledTimestep *= 60.0f / g_Config.iFpsLimit; } @@ -603,8 +601,6 @@ static void DoFrameIdleTiming() { } float scaledVblank = timePerVblank; - if (g_Config.bRefreshAt60Hz) - scaledVblank = scaledVblank * 1.001f; if (PSP_CoreParameter().fpsLimit == FPS_LIMIT_CUSTOM) { // 0 is handled in FrameTimingThrottled(). scaledVblank *= 60.0f / g_Config.iFpsLimit; @@ -932,7 +928,7 @@ u32 sceDisplaySetFramebuf(u32 topaddr, int linesize, int pixelformat, int sync) } // 1001 to account for NTSC timing (59.94 fps.) - u64 expected = msToCycles(1001) / g_Config.iForceMaxEmulatedFPS - LEEWAY_CYCLES_PER_FLIP; + u64 expected = msToCycles(g_Config.bRefreshAt60Hz ? 1000 : 1001) / g_Config.iForceMaxEmulatedFPS - LEEWAY_CYCLES_PER_FLIP; lastFlipCycles = now; nextFlipCycles = std::max(lastFlipCycles, nextFlipCycles) + expected; } @@ -1080,7 +1076,7 @@ static int sceDisplayGetAccumulatedHcount() { } static float sceDisplayGetFramePerSec() { - const static float framePerSec = 59.9400599f; + const static float framePerSec = g_Config.bRefreshAt60Hz ? 60.0f : 59.9400599f; VERBOSE_LOG(SCEDISPLAY,"%f=sceDisplayGetFramePerSec()", framePerSec); return framePerSec; // (9MHz * 1)/(525 * 286) } diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index 8e4f6530df8d..b4b1900f3d19 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -1308,7 +1308,7 @@ void OtherSettingsScreen::CreateViews() { emulatedSpeed->SetZeroLabel(gr->T("Disabled")); list->Add(new CheckBox(&g_Config.bShowFrameProfiler, gr->T("Display frame profiler(heavy!)"))); list->Add(new CheckBox(&g_Config.bSimpleFrameStats, gr->T("Display simple frame stats(heavy!)"))); - list->Add(new CheckBox(&g_Config.bRefreshAt60Hz, gr->T("Refresh at 60Hz(might help some gpu's to avoid stutter)"))); + list->Add(new CheckBox(&g_Config.bRefreshAt60Hz, gr->T("Refresh at 60Hz(gamebreaking, but might be needed for NVidia stutter)"))); } void OtherSettingsScreen::onFinish(DialogResult result) {