Change previously added hack.

This commit is contained in:
LunaMoo committed 2018-01-16 00:33:15 +01:00
1 parent 867293dd17
commit 2363ca676c
3 files changed
+5 -9

No files matched your search

+1 -1
View File
@@ -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;
+3 -7
View File
@@ -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)
}
+1 -1
View File
@@ -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) {