Add speed limit percentage option
Hariu7 opened this issue · comments
By enable speed limit we can choose how game will run fast
const auto& settings = Settings::values;
auto speed_scale = 1.f;
if (settings.use_multi_core.GetValue()) {
if (settings.use_speed_limit.GetValue()) {
// Scales the speed based on speed_limit setting on MC. SC is handled by
// SpeedLimiter::DoSpeedLimiting.
speed_scale = 100.f / settings.speed_limit.GetValue();
} else {
// Run at unlocked framerate.
speed_scale = 0.01f;
}
}
const auto& settings = Settings::values;
auto speed_scale = 1.f;
if (settings.use_multi_core.GetValue()) {
if (settings.use_speed_limit.GetValue()) {
// Scales the speed based on speed_limit setting on MC. SC is handled by
// SpeedLimiter::DoSpeedLimiting.
speed_scale = 100.f / settings.speed_limit.GetValue();
} else {
// Run at unlocked framerate.
speed_scale = 0.01f;
}
}
@lynxnb idk if this will be useful.
@Hariu7 please make sure to credit the source project when you copy/paste code
@Crytonics we already have plans to improve locking the frame rate to the game's required value. We rely on the OS to do it for us at the moment, but it's apparently hard for OEMs to get it right 🥴
@Hariu7 please make sure to credit the source project when you copy/paste code
Yuzu
I'm going to close this issue as not planned since we won't ever implement a speed percent limit option, but we will improve the accuracy of our frame rate limit code in the future, eliminating the need for speed limit setting.