From 8a674958a730a36dbcc43910412521420a804c69 Mon Sep 17 00:00:00 2001 From: pineappleEA Date: Sun, 26 Jun 2022 23:52:25 +0200 Subject: [PATCH] early-access version 2803 --- README.md | 2 +- src/core/hle/service/nvflinger/nvflinger.cpp | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e3f10dbdd..368796cd1 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ yuzu emulator early access ============= -This is the source code for early-access 2802. +This is the source code for early-access 2803. ## Legal Notice diff --git a/src/core/hle/service/nvflinger/nvflinger.cpp b/src/core/hle/service/nvflinger/nvflinger.cpp index a22c90ad0..95c0715c2 100755 --- a/src/core/hle/service/nvflinger/nvflinger.cpp +++ b/src/core/hle/service/nvflinger/nvflinger.cpp @@ -291,7 +291,14 @@ s64 NVFlinger::GetNextTicks() const { const auto& settings = Settings::values; const bool unlocked_fps = settings.disable_fps_limit.GetValue(); const s64 fps_cap = unlocked_fps ? static_cast(settings.fps_cap.GetValue()) : 1; - return (1000000000 * (1LL << swap_interval)) / (max_hertz * fps_cap); + 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(); + } + return static_cast(((1000000000 * (1LL << swap_interval)) / (max_hertz * fps_cap)) * + speed_scale); } } // namespace Service::NVFlinger