mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-28 00:30:24 -06:00
implement 3 configurable and toggleable framerate targets (#2159)
This pr allows for configuring the framerate target and adds support for two other framerate targets, a "fastforward" and "slowmo" target which can be enabled via either a toggle or holding a button. this allows for supporting a more accurate framerate target and allows for users to slow down the speed of gameplay if they so desire
This commit is contained in:
@ -88,7 +88,31 @@ EmuInstance::EmuInstance(int inst) : deleting(false),
|
||||
cheatsOn = localCfg.GetBool("EnableCheats");
|
||||
|
||||
doLimitFPS = globalCfg.GetBool("LimitFPS");
|
||||
maxFPS = globalCfg.GetInt("MaxFPS");
|
||||
|
||||
double val = globalCfg.GetDouble("TargetFPS");
|
||||
if (val == 0.0)
|
||||
{
|
||||
Platform::Log(Platform::LogLevel::Error, "Target FPS in config invalid\n");
|
||||
targetFPS = 1.0 / 60.0;
|
||||
}
|
||||
else targetFPS = 1.0 / val;
|
||||
|
||||
val = globalCfg.GetDouble("FastForwardFPS");
|
||||
if (val == 0.0)
|
||||
{
|
||||
Platform::Log(Platform::LogLevel::Error, "Fast-Forward FPS in config invalid\n");
|
||||
fastForwardFPS = 1.0 / 60.0;
|
||||
}
|
||||
else fastForwardFPS = 1.0 / val;
|
||||
|
||||
val = globalCfg.GetDouble("SlowmoFPS");
|
||||
if (val == 0.0)
|
||||
{
|
||||
Platform::Log(Platform::LogLevel::Error, "Slow-Mo FPS in config invalid\n");
|
||||
slowmoFPS = 1.0 / 60.0;
|
||||
}
|
||||
else slowmoFPS = 1.0 / val;
|
||||
|
||||
doAudioSync = globalCfg.GetBool("AudioSync");
|
||||
|
||||
mpAudioMode = globalCfg.GetInt("MP.AudioMode");
|
||||
|
Reference in New Issue
Block a user