mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-16 07:50:28 +02:00
Display: Ignore lagsync when auto frameskip on.
The delays in lag sync will only confuse the frameskipping code, because it will interpret the intentional delays as need for skipping. In theory, frameskip could ignore the lag sync time, but it would still make frameskip far less effective.
This commit is contained in:
1 parent
28532fe4ef
commit
bbbb154da0
2 files changed
+8
-4
No files matched your search
@@ -149,8 +149,12 @@ void __DisplayVblankEndCallback(SceUID threadID, SceUID prevCallbackId);
|
||||
|
||||
void __DisplayFlip(int cyclesLate);
|
||||
|
||||
static bool UseLagSync() {
|
||||
return g_Config.bForceLagSync && !g_Config.bAutoFrameSkip;
|
||||
}
|
||||
|
||||
static void ScheduleLagSync(int over = 0) {
|
||||
lagSyncScheduled = g_Config.bForceLagSync;
|
||||
lagSyncScheduled = UseLagSync();
|
||||
if (lagSyncScheduled) {
|
||||
// Reset over if it became too high, such as after pausing or initial loading.
|
||||
// There's no real sense in it being more than 1/60th of a second.
|
||||
@@ -239,7 +243,7 @@ void __DisplayDoState(PointerWrap &p) {
|
||||
Do(p, lagSyncScheduled);
|
||||
CoreTiming::RestoreRegisterEvent(lagSyncEvent, "LagSync", &hleLagSync);
|
||||
lastLagSync = time_now_d();
|
||||
if (lagSyncScheduled != g_Config.bForceLagSync) {
|
||||
if (lagSyncScheduled != UseLagSync()) {
|
||||
ScheduleLagSync();
|
||||
}
|
||||
} else {
|
||||
@@ -652,7 +656,7 @@ void hleAfterFlip(u64 userdata, int cyclesLate) {
|
||||
PPGeNotifyFrame();
|
||||
|
||||
// This seems like as good a time as any to check if the config changed.
|
||||
if (lagSyncScheduled != g_Config.bForceLagSync) {
|
||||
if (lagSyncScheduled != UseLagSync()) {
|
||||
ScheduleLagSync();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -988,7 +988,7 @@ void GameSettingsScreen::CreateViews() {
|
||||
|
||||
static const char *ioTimingMethods[] = { "Fast (lag on slow storage)", "Host (bugs, less lag)", "Simulate UMD delays" };
|
||||
View *ioTimingMethod = systemSettings->Add(new PopupMultiChoice(&g_Config.iIOTimingMethod, sy->T("IO timing method"), ioTimingMethods, 0, ARRAY_SIZE(ioTimingMethods), sy->GetName(), screenManager()));
|
||||
systemSettings->Add(new CheckBox(&g_Config.bForceLagSync, sy->T("Force real clock sync (slower, less lag)")));
|
||||
systemSettings->Add(new CheckBox(&g_Config.bForceLagSync, sy->T("Force real clock sync (slower, less lag)")))->SetDisabledPtr(&g_Config.bAutoFrameSkip);
|
||||
PopupSliderChoice *lockedMhz = systemSettings->Add(new PopupSliderChoice(&g_Config.iLockedCPUSpeed, 0, 1000, sy->T("Change CPU Clock", "Change CPU Clock (unstable)"), screenManager(), sy->T("MHz, 0:default")));
|
||||
lockedMhz->OnChange.Add([&](UI::EventParams &) {
|
||||
enableReportsCheckbox_->SetEnabled(Reporting::IsSupported());
|
||||
|
||||
Reference in new issue
Block a user