early-access version 2837

This commit is contained in:
pineappleEA
2022-07-16 08:06:52 +02:00
parent 2a9883730d
commit 3302f6dd79
12 changed files with 25 additions and 136 deletions

View File

@@ -288,16 +288,18 @@ s64 NVFlinger::GetNextTicks() const {
static constexpr s64 max_hertz = 120LL;
const auto& settings = Settings::values;
const bool unlocked_fps = settings.disable_fps_limit.GetValue();
const s64 fps_cap = unlocked_fps ? static_cast<s64>(settings.fps_cap.GetValue()) : 1;
auto speed_scale = 1.f;
if (settings.use_speed_limit.GetValue() && settings.use_multi_core.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();
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;
}
}
return static_cast<s64>(((1000000000 * (1LL << swap_interval)) / (max_hertz * fps_cap)) *
speed_scale);
return static_cast<s64>(((1000000000 * (1LL << swap_interval)) / max_hertz) * speed_scale);
}
} // namespace Service::NVFlinger