summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/core/hle/service/nvflinger/nvflinger.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/core/hle/service/nvflinger/nvflinger.cpp b/src/core/hle/service/nvflinger/nvflinger.cpp
index 5f69c8c2c..f92d6beb5 100644
--- a/src/core/hle/service/nvflinger/nvflinger.cpp
+++ b/src/core/hle/service/nvflinger/nvflinger.cpp
@@ -289,7 +289,14 @@ s64 NVFlinger::GetNextTicks() const {
289 const auto& settings = Settings::values; 289 const auto& settings = Settings::values;
290 const bool unlocked_fps = settings.disable_fps_limit.GetValue(); 290 const bool unlocked_fps = settings.disable_fps_limit.GetValue();
291 const s64 fps_cap = unlocked_fps ? static_cast<s64>(settings.fps_cap.GetValue()) : 1; 291 const s64 fps_cap = unlocked_fps ? static_cast<s64>(settings.fps_cap.GetValue()) : 1;
292 return (1000000000 * (1LL << swap_interval)) / (max_hertz * fps_cap); 292 auto speed_scale = 1.f;
293 if (settings.use_speed_limit.GetValue() && settings.use_multi_core.GetValue()) {
294 // Scales the speed based on speed_limit setting on MC. SC is handled by
295 // SpeedLimiter::DoSpeedLimiting.
296 speed_scale = 100.f / settings.speed_limit.GetValue();
297 }
298 return static_cast<s64>(((1000000000 * (1LL << swap_interval)) / (max_hertz * fps_cap)) *
299 speed_scale);
293} 300}
294 301
295} // namespace Service::NVFlinger 302} // namespace Service::NVFlinger