mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-24 14:00:03 +00:00
Merge pull request #11768 from hrydgard/remove-limit-framerate-setting
Remove iForceMaxEmulatedFPS and replace with a compat setting for the few games that really need it
This commit is contained in:
commit
fe8f558b91
@ -62,6 +62,7 @@ void Compatibility::CheckSettings(IniFile &iniFile, const std::string &gameID) {
|
||||
CheckSetting(iniFile, gameID, "BlockTransferAllowCreateFB", &flags_.BlockTransferAllowCreateFB);
|
||||
CheckSetting(iniFile, gameID, "YugiohSaveFix", &flags_.YugiohSaveFix);
|
||||
CheckSetting(iniFile, gameID, "ForceUMDDelay", &flags_.ForceUMDDelay);
|
||||
CheckSetting(iniFile, gameID, "ForceMax60FPS", &flags_.ForceMax60FPS);
|
||||
}
|
||||
|
||||
void Compatibility::CheckSetting(IniFile &iniFile, const std::string &gameID, const char *option, bool *flag) {
|
||||
|
@ -62,6 +62,7 @@ struct CompatFlags {
|
||||
bool BlockTransferAllowCreateFB;
|
||||
bool YugiohSaveFix;
|
||||
bool ForceUMDDelay;
|
||||
bool ForceMax60FPS;
|
||||
};
|
||||
|
||||
class IniFile;
|
||||
|
@ -625,7 +625,6 @@ static ConfigSetting graphicsSettings[] = {
|
||||
#if defined(USING_WIN_UI)
|
||||
ConfigSetting("RestartRequired", &g_Config.bRestartRequired, false, false),
|
||||
#endif
|
||||
ReportedConfigSetting("ForceMaxEmulatedFPS", &g_Config.iForceMaxEmulatedFPS, 60, true, true),
|
||||
|
||||
// Most low-performance (and many high performance) mobile GPUs do not support aniso anyway so defaulting to 4 is fine.
|
||||
ConfigSetting("AnisotropyLevel", &g_Config.iAnisotropyLevel, 4, true, true),
|
||||
|
@ -176,7 +176,6 @@ public:
|
||||
bool bTexDeposterize;
|
||||
int iFpsLimit1;
|
||||
int iFpsLimit2;
|
||||
int iForceMaxEmulatedFPS;
|
||||
int iMaxRecent;
|
||||
int iCurrentStateSlot;
|
||||
int iRewindFlipFrequency;
|
||||
|
@ -928,7 +928,7 @@ u32 sceDisplaySetFramebuf(u32 topaddr, int linesize, int pixelformat, int sync)
|
||||
|
||||
s64 delayCycles = 0;
|
||||
// Don't count transitions between display off and display on.
|
||||
if (topaddr != 0 && topaddr != framebuf.topaddr && framebuf.topaddr != 0 && g_Config.iForceMaxEmulatedFPS > 0) {
|
||||
if (topaddr != 0 && topaddr != framebuf.topaddr && framebuf.topaddr != 0 && PSP_CoreParameter().compat.flags().ForceMax60FPS) {
|
||||
// sceDisplaySetFramebuf() isn't supposed to delay threads at all. This is a hack.
|
||||
// So let's only delay when it's more than 1ms.
|
||||
const s64 FLIP_DELAY_CYCLES_MIN = usToCycles(1000);
|
||||
@ -952,7 +952,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(1001) / 60 - LEEWAY_CYCLES_PER_FLIP;
|
||||
lastFlipCycles = now;
|
||||
nextFlipCycles = std::max(lastFlipCycles, nextFlipCycles) + expected;
|
||||
}
|
||||
|
@ -137,8 +137,6 @@ void GameSettingsScreen::CreateViews() {
|
||||
g_Config.loadGameConfig(gameID_);
|
||||
}
|
||||
|
||||
cap60FPS_ = g_Config.iForceMaxEmulatedFPS == 60;
|
||||
|
||||
iAlternateSpeedPercent1_ = g_Config.iFpsLimit1 < 0 ? -1 : (g_Config.iFpsLimit1 * 100) / 60;
|
||||
iAlternateSpeedPercent2_ = g_Config.iFpsLimit2 < 0 ? -1 : (g_Config.iFpsLimit2 * 100) / 60;
|
||||
|
||||
@ -276,7 +274,6 @@ void GameSettingsScreen::CreateViews() {
|
||||
graphicsSettings->Add(new PopupMultiChoice(&g_Config.iFrameSkipType, gr->T("Frame Skipping Type"), frameSkipType, 0, ARRAY_SIZE(frameSkipType), gr->GetName(), screenManager()));
|
||||
frameSkipAuto_ = graphicsSettings->Add(new CheckBox(&g_Config.bAutoFrameSkip, gr->T("Auto FrameSkip")));
|
||||
frameSkipAuto_->OnClick.Handle(this, &GameSettingsScreen::OnAutoFrameskip);
|
||||
graphicsSettings->Add(new CheckBox(&cap60FPS_, gr->T("Force max 60 FPS (helps GoW)")));
|
||||
|
||||
PopupSliderChoice *altSpeed1 = graphicsSettings->Add(new PopupSliderChoice(&iAlternateSpeedPercent1_, 0, 1000, gr->T("Alternative Speed", "Alternative speed"), 5, screenManager(), gr->T("%, 0:unlimited")));
|
||||
altSpeed1->SetFormat("%i%%");
|
||||
@ -1037,7 +1034,6 @@ UI::EventReturn GameSettingsScreen::OnDumpNextFrameToLog(UI::EventParams &e) {
|
||||
|
||||
void GameSettingsScreen::update() {
|
||||
UIScreen::update();
|
||||
g_Config.iForceMaxEmulatedFPS = cap60FPS_ ? 60 : 0;
|
||||
|
||||
g_Config.iFpsLimit1 = iAlternateSpeedPercent1_ < 0 ? -1 : (iAlternateSpeedPercent1_ * 60) / 100;
|
||||
g_Config.iFpsLimit2 = iAlternateSpeedPercent2_ < 0 ? -1 : (iAlternateSpeedPercent2_ * 60) / 100;
|
||||
|
@ -389,3 +389,27 @@ NPJH00142 = true
|
||||
# F1 2006
|
||||
UCES00238 = true
|
||||
UCJS10045 = true
|
||||
|
||||
[ForceMax60FPS]
|
||||
# The GOW games are very heavy and render as fast as they can. They benefit greatly from
|
||||
# capping the framerate at 60fps.
|
||||
|
||||
# GOW : Ghost of Sparta
|
||||
UCUS98737 = true
|
||||
UCAS40323 = true
|
||||
NPHG00092 = true
|
||||
NPEG00044 = true
|
||||
NPJG00120 = true
|
||||
UCJS10114 = true
|
||||
UCES01401 = true
|
||||
# GOW : Chains Of Olympus
|
||||
UCUS98653 = true
|
||||
UCUS98705 = true
|
||||
UCES00842 = true
|
||||
ULJM05438 = true
|
||||
ULJM05348 = true
|
||||
UCKS45084 = true
|
||||
NPUG80325 = true
|
||||
NPEG00023 = true
|
||||
NPHG00028 = true
|
||||
NPJG00120 = true
|
||||
|
@ -170,7 +170,6 @@ static RetroOption<int> ppsspp_rendering_mode("ppsspp_rendering_mode", "Renderin
|
||||
static RetroOption<bool> ppsspp_auto_frameskip("ppsspp_auto_frameskip", "Auto Frameskip", false);
|
||||
static RetroOption<int> ppsspp_frameskip("ppsspp_frameskip", "Frameskip", 0, 10);
|
||||
static RetroOption<int> ppsspp_frameskiptype("ppsspp_frameskiptype", "Frameskip Type", 0, 10);
|
||||
static RetroOption<int> ppsspp_force_max_fps("ppsspp_force_max_fps", "Force Max FPS", { { "disabled", 0 }, { "enabled", 60 } });
|
||||
static RetroOption<int> ppsspp_audio_latency("ppsspp_audio_latency", "Audio latency", { "low", "medium", "high" });
|
||||
static RetroOption<int> ppsspp_internal_resolution("ppsspp_internal_resolution", "Internal Resolution", 1, { "480x272", "960x544", "1440x816", "1920x1088", "2400x1360", "2880x1632", "3360x1904", "3840x2176", "4320x2448", "4800x2720" });
|
||||
static RetroOption<int> ppsspp_button_preference("ppsspp_button_preference", "Confirmation Button", { { "cross", PSP_SYSTEMPARAM_BUTTON_CROSS }, { "circle", PSP_SYSTEMPARAM_BUTTON_CIRCLE } });
|
||||
@ -198,7 +197,6 @@ void retro_set_environment(retro_environment_t cb) {
|
||||
vars.push_back(ppsspp_auto_frameskip.GetOptions());
|
||||
vars.push_back(ppsspp_frameskip.GetOptions());
|
||||
vars.push_back(ppsspp_frameskiptype.GetOptions());
|
||||
vars.push_back(ppsspp_force_max_fps.GetOptions());
|
||||
vars.push_back(ppsspp_audio_latency.GetOptions());
|
||||
vars.push_back(ppsspp_internal_resolution.GetOptions());
|
||||
vars.push_back(ppsspp_button_preference.GetOptions());
|
||||
@ -282,7 +280,6 @@ static void check_variables(CoreParameter &coreParam) {
|
||||
ppsspp_cheats.Update(&g_Config.bEnableCheats);
|
||||
ppsspp_locked_cpu_speed.Update(&g_Config.iLockedCPUSpeed);
|
||||
ppsspp_rendering_mode.Update(&g_Config.iRenderingMode);
|
||||
ppsspp_force_max_fps.Update(&g_Config.iForceMaxEmulatedFPS);
|
||||
ppsspp_cpu_core.Update((CPUCore *)&g_Config.iCpuCore);
|
||||
|
||||
ppsspp_language.Update(&g_Config.iLanguage);
|
||||
|
Loading…
Reference in New Issue
Block a user