mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-05 04:03:49 +01:00
Some cleanup of the frameskipping setting. Avoid having Auto Frameskip reset the frameskip setting to 1.
This commit is contained in:
1 parent
1363cb2282
commit
c8db8463f2
3 files changed
+15
-9
No files matched your search
@@ -1224,10 +1224,6 @@ bool Config::LoadAppendedConfig() {
|
||||
}
|
||||
|
||||
void Config::UpdateAfterSettingAutoFrameSkip() {
|
||||
if (bAutoFrameSkip && iFrameSkip == 0) {
|
||||
iFrameSkip = 1;
|
||||
}
|
||||
|
||||
if (bAutoFrameSkip && bSkipBufferEffects) {
|
||||
bSkipBufferEffects = false;
|
||||
}
|
||||
|
||||
@@ -156,8 +156,12 @@ void __DisplayVblankEndCallback(SceUID threadID, SceUID prevCallbackId);
|
||||
void __DisplayFlip(int cyclesLate);
|
||||
static void __DisplaySetFramerate(void);
|
||||
|
||||
static bool UseAutoFrameSkip() {
|
||||
return g_Config.bAutoFrameSkip && !g_Config.bSkipBufferEffects;
|
||||
}
|
||||
|
||||
static bool UseLagSync() {
|
||||
return g_Config.bForceLagSync && !g_Config.bAutoFrameSkip;
|
||||
return g_Config.bForceLagSync && !UseAutoFrameSkip();
|
||||
}
|
||||
|
||||
static void ScheduleLagSync(int over = 0) {
|
||||
@@ -402,6 +406,8 @@ static void DoFrameTiming(bool throttle, bool *skipFrame, float scaledTimestep,
|
||||
PROFILE_THIS_SCOPE("timing");
|
||||
*skipFrame = false;
|
||||
|
||||
const bool autoFrameSkip = UseAutoFrameSkip();
|
||||
|
||||
// Check if the frameskipping code should be enabled. If neither throttling or frameskipping is on,
|
||||
// we have nothing to do here.
|
||||
bool doFrameSkip = g_Config.iFrameSkip != 0;
|
||||
@@ -424,8 +430,8 @@ static void DoFrameTiming(bool throttle, bool *skipFrame, float scaledTimestep,
|
||||
}
|
||||
|
||||
// Auto-frameskip automatically if speed limit is set differently than the default.
|
||||
int frameSkipNum = g_Config.iFrameSkip;
|
||||
if (g_Config.bAutoFrameSkip && !g_Config.bSkipBufferEffects) {
|
||||
const int frameSkipNum = g_Config.iFrameSkip;
|
||||
if (autoFrameSkip) {
|
||||
// autoframeskip
|
||||
// Argh, we are falling behind! Let's skip a frame and see if we catch up.
|
||||
if (curFrameTime > nextFrameTime && doFrameSkip) {
|
||||
|
||||
@@ -466,7 +466,11 @@ void GameSettingsScreen::CreateGraphicsSettings(UI::ViewGroup *graphicsSettings)
|
||||
|
||||
graphicsSettings->Add(new ItemHeader(gr->T("Frame Rate Control")));
|
||||
static const char *frameSkip[] = {"Off", "1", "2", "3", "4", "5", "6", "7", "8"};
|
||||
graphicsSettings->Add(new PopupMultiChoice(&g_Config.iFrameSkip, gr->T("Frame Skipping"), frameSkip, 0, ARRAY_SIZE(frameSkip), I18NCat::GRAPHICS, screenManager()));
|
||||
PopupMultiChoice *frameSkipping = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iFrameSkip, gr->T("Frame Skipping"), frameSkip, 0, ARRAY_SIZE(frameSkip), I18NCat::GRAPHICS, screenManager()));
|
||||
frameSkipping->SetEnabledFunc([] {
|
||||
return !g_Config.bAutoFrameSkip;
|
||||
});
|
||||
|
||||
CheckBox *frameSkipAuto = graphicsSettings->Add(new CheckBox(&g_Config.bAutoFrameSkip, gr->T("Auto FrameSkip")));
|
||||
frameSkipAuto->OnClick.Add([](UI::EventParams &e) {
|
||||
g_Config.UpdateAfterSettingAutoFrameSkip();
|
||||
@@ -1073,7 +1077,7 @@ void GameSettingsScreen::CreateNetworkingSettings(UI::ViewGroup *networkingSetti
|
||||
PopupTextInputChoice *qc4 = networkingSettings->Add(new PopupTextInputChoice(GetRequesterToken(), &g_Config.sQuickChat[3], n->T("Quick Chat 4"), "", 32, screenManager()));
|
||||
PopupTextInputChoice *qc5 = networkingSettings->Add(new PopupTextInputChoice(GetRequesterToken(), &g_Config.sQuickChat[4], n->T("Quick Chat 5"), "", 32, screenManager()));
|
||||
#elif defined(USING_QT_UI)
|
||||
] Choice *qc1 = networkingSettings->Add(new Choice(n->T("Quick Chat 1")));
|
||||
Choice *qc1 = networkingSettings->Add(new Choice(n->T("Quick Chat 1")));
|
||||
Choice *qc2 = networkingSettings->Add(new Choice(n->T("Quick Chat 2")));
|
||||
Choice *qc3 = networkingSettings->Add(new Choice(n->T("Quick Chat 3")));
|
||||
Choice *qc4 = networkingSettings->Add(new Choice(n->T("Quick Chat 4")));
|
||||
|
||||
Reference in new issue
Block a user