Config: Remove unused FrameLimitEnable field

This commit is contained in:
Stenzek 2024-05-04 23:36:54 +10:00 committed by Connor McLaughlin
parent 2ab6a3b873
commit 89f4ac9b9a
3 changed files with 15 additions and 24 deletions

View File

@ -985,7 +985,6 @@ struct Pcsx2Config
struct EmulationSpeedOptions struct EmulationSpeedOptions
{ {
BITFIELD32() BITFIELD32()
bool FrameLimitEnable : 1;
bool SyncToHostRefreshRate : 1; bool SyncToHostRefreshRate : 1;
BITFIELD_END BITFIELD_END

View File

@ -1486,7 +1486,6 @@ Pcsx2Config::EmulationSpeedOptions::EmulationSpeedOptions()
{ {
bitset = 0; bitset = 0;
FrameLimitEnable = true;
SyncToHostRefreshRate = false; SyncToHostRefreshRate = false;
} }

View File

@ -133,7 +133,6 @@ namespace VMManager
static void SaveSessionTime(const std::string& prev_serial); static void SaveSessionTime(const std::string& prev_serial);
static void ReloadPINE(); static void ReloadPINE();
static LimiterModeType GetInitialLimiterMode();
static float GetTargetSpeedForLimiterMode(LimiterModeType mode); static float GetTargetSpeedForLimiterMode(LimiterModeType mode);
static void ResetFrameLimiter(); static void ResetFrameLimiter();
static double AdjustToHostRefreshRate(float frame_rate, float target_speed); static double AdjustToHostRefreshRate(float frame_rate, float target_speed);
@ -1371,7 +1370,7 @@ bool VMManager::Initialize(VMBootParameters boot_params)
} }
} }
s_limiter_mode = GetInitialLimiterMode(); s_limiter_mode = LimiterModeType::Nominal;
s_target_speed = GetTargetSpeedForLimiterMode(s_limiter_mode); s_target_speed = GetTargetSpeedForLimiterMode(s_limiter_mode);
s_use_vsync_for_timing = false; s_use_vsync_for_timing = false;
@ -1980,11 +1979,6 @@ float VMManager::GetTargetSpeed()
return s_target_speed; return s_target_speed;
} }
LimiterModeType VMManager::GetInitialLimiterMode()
{
return EmuConfig.EmulationSpeed.FrameLimitEnable ? LimiterModeType::Nominal : LimiterModeType::Unlimited;
}
double VMManager::AdjustToHostRefreshRate(float frame_rate, float target_speed) double VMManager::AdjustToHostRefreshRate(float frame_rate, float target_speed)
{ {
if (!EmuConfig.EmulationSpeed.SyncToHostRefreshRate || target_speed != 1.0f) if (!EmuConfig.EmulationSpeed.SyncToHostRefreshRate || target_speed != 1.0f)
@ -2015,27 +2009,26 @@ double VMManager::AdjustToHostRefreshRate(float frame_rate, float target_speed)
float VMManager::GetTargetSpeedForLimiterMode(LimiterModeType mode) float VMManager::GetTargetSpeedForLimiterMode(LimiterModeType mode)
{ {
if (EmuConfig.EmulationSpeed.FrameLimitEnable && (!EmuConfig.EnableFastBootFastForward || !VMManager::Internal::IsFastBootInProgress())) if (EmuConfig.EnableFastBootFastForward && VMManager::Internal::IsFastBootInProgress())
return 0.0f;
switch (s_limiter_mode)
{ {
switch (s_limiter_mode) case LimiterModeType::Nominal:
{ return EmuConfig.EmulationSpeed.NominalScalar;
case LimiterModeType::Nominal:
return EmuConfig.EmulationSpeed.NominalScalar;
case LimiterModeType::Slomo: case LimiterModeType::Slomo:
return EmuConfig.EmulationSpeed.SlomoScalar; return EmuConfig.EmulationSpeed.SlomoScalar;
case LimiterModeType::Turbo: case LimiterModeType::Turbo:
return EmuConfig.EmulationSpeed.TurboScalar; return EmuConfig.EmulationSpeed.TurboScalar;
case LimiterModeType::Unlimited: case LimiterModeType::Unlimited:
return 0.0f; return 0.0f;
jNO_DEFAULT default:
} ASSUME(false);
} }
return 0.0f;
} }
void VMManager::UpdateTargetSpeed() void VMManager::UpdateTargetSpeed()