mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-01-31 10:32:30 +00:00
Merge pull request #17695 from hrydgard/allow-faster-alternate-speeds
In challenge mode, allow faster alternate speeds (but not slower).
This commit is contained in:
commit
e38138a39d
@ -349,14 +349,16 @@ void __DisplaySetWasPaused() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int FrameTimingLimit() {
|
static int FrameTimingLimit() {
|
||||||
if (!Achievements::ChallengeModeActive()) {
|
bool challenge = Achievements::ChallengeModeActive();
|
||||||
if (PSP_CoreParameter().fpsLimit == FPSLimit::CUSTOM1)
|
|
||||||
return g_Config.iFpsLimit1;
|
// Can't slow down in challenge mode.
|
||||||
if (PSP_CoreParameter().fpsLimit == FPSLimit::CUSTOM2)
|
int minRate = challenge ? 60 : 1;
|
||||||
return g_Config.iFpsLimit2;
|
if (PSP_CoreParameter().fpsLimit == FPSLimit::CUSTOM1)
|
||||||
if (PSP_CoreParameter().fpsLimit == FPSLimit::ANALOG)
|
return std::max(g_Config.iFpsLimit1, minRate);
|
||||||
return PSP_CoreParameter().analogFpsLimit;
|
if (PSP_CoreParameter().fpsLimit == FPSLimit::CUSTOM2)
|
||||||
}
|
return std::max(g_Config.iFpsLimit2, minRate);
|
||||||
|
if (PSP_CoreParameter().fpsLimit == FPSLimit::ANALOG)
|
||||||
|
return std::max(PSP_CoreParameter().analogFpsLimit, minRate);
|
||||||
// Note: Fast-forward is OK in challenge mode.
|
// Note: Fast-forward is OK in challenge mode.
|
||||||
if (PSP_CoreParameter().fastForward)
|
if (PSP_CoreParameter().fastForward)
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -584,7 +584,7 @@ void EmuScreen::onVKey(int virtualKeyCode, bool down) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case VIRTKEY_SPEED_TOGGLE:
|
case VIRTKEY_SPEED_TOGGLE:
|
||||||
if (down && !Achievements::WarnUserIfChallengeModeActive()) {
|
if (down) {
|
||||||
// Cycle through enabled speeds.
|
// Cycle through enabled speeds.
|
||||||
if (PSP_CoreParameter().fpsLimit == FPSLimit::NORMAL && g_Config.iFpsLimit1 >= 0) {
|
if (PSP_CoreParameter().fpsLimit == FPSLimit::NORMAL && g_Config.iFpsLimit1 >= 0) {
|
||||||
PSP_CoreParameter().fpsLimit = FPSLimit::CUSTOM1;
|
PSP_CoreParameter().fpsLimit = FPSLimit::CUSTOM1;
|
||||||
@ -600,32 +600,28 @@ void EmuScreen::onVKey(int virtualKeyCode, bool down) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case VIRTKEY_SPEED_CUSTOM1:
|
case VIRTKEY_SPEED_CUSTOM1:
|
||||||
if (!Achievements::WarnUserIfChallengeModeActive()) {
|
if (down) {
|
||||||
if (down) {
|
if (PSP_CoreParameter().fpsLimit == FPSLimit::NORMAL) {
|
||||||
if (PSP_CoreParameter().fpsLimit == FPSLimit::NORMAL) {
|
PSP_CoreParameter().fpsLimit = FPSLimit::CUSTOM1;
|
||||||
PSP_CoreParameter().fpsLimit = FPSLimit::CUSTOM1;
|
g_OSD.Show(OSDType::MESSAGE_INFO, sc->T("fixed", "Speed: alternate"), 1.0);
|
||||||
g_OSD.Show(OSDType::MESSAGE_INFO, sc->T("fixed", "Speed: alternate"), 1.0);
|
}
|
||||||
}
|
} else {
|
||||||
} else {
|
if (PSP_CoreParameter().fpsLimit == FPSLimit::CUSTOM1) {
|
||||||
if (PSP_CoreParameter().fpsLimit == FPSLimit::CUSTOM1) {
|
PSP_CoreParameter().fpsLimit = FPSLimit::NORMAL;
|
||||||
PSP_CoreParameter().fpsLimit = FPSLimit::NORMAL;
|
g_OSD.Show(OSDType::MESSAGE_INFO, sc->T("standard", "Speed: standard"), 1.0);
|
||||||
g_OSD.Show(OSDType::MESSAGE_INFO, sc->T("standard", "Speed: standard"), 1.0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case VIRTKEY_SPEED_CUSTOM2:
|
case VIRTKEY_SPEED_CUSTOM2:
|
||||||
if (!Achievements::WarnUserIfChallengeModeActive()) {
|
if (down) {
|
||||||
if (down) {
|
if (PSP_CoreParameter().fpsLimit == FPSLimit::NORMAL) {
|
||||||
if (PSP_CoreParameter().fpsLimit == FPSLimit::NORMAL) {
|
PSP_CoreParameter().fpsLimit = FPSLimit::CUSTOM2;
|
||||||
PSP_CoreParameter().fpsLimit = FPSLimit::CUSTOM2;
|
g_OSD.Show(OSDType::MESSAGE_INFO, sc->T("SpeedCustom2", "Speed: alternate 2"), 1.0);
|
||||||
g_OSD.Show(OSDType::MESSAGE_INFO, sc->T("SpeedCustom2", "Speed: alternate 2"), 1.0);
|
}
|
||||||
}
|
} else {
|
||||||
} else {
|
if (PSP_CoreParameter().fpsLimit == FPSLimit::CUSTOM2) {
|
||||||
if (PSP_CoreParameter().fpsLimit == FPSLimit::CUSTOM2) {
|
PSP_CoreParameter().fpsLimit = FPSLimit::NORMAL;
|
||||||
PSP_CoreParameter().fpsLimit = FPSLimit::NORMAL;
|
g_OSD.Show(OSDType::MESSAGE_INFO, sc->T("standard", "Speed: standard"), 1.0);
|
||||||
g_OSD.Show(OSDType::MESSAGE_INFO, sc->T("standard", "Speed: standard"), 1.0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user