diff options
author | bunnei <bunneidev@gmail.com> | 2022-06-26 22:58:06 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2022-07-17 08:10:45 +0200 |
commit | f8aaa599907cff765efdaa6f9875cb4c42746870 (patch) | |
tree | c0c4806f6e6434224bd3ee6ff7afdec8278b9439 /src/core/hle | |
parent | Merge pull request #8593 from merryhime/ranged-setting-T (diff) | |
download | yuzu-f8aaa599907cff765efdaa6f9875cb4c42746870.tar yuzu-f8aaa599907cff765efdaa6f9875cb4c42746870.tar.gz yuzu-f8aaa599907cff765efdaa6f9875cb4c42746870.tar.bz2 yuzu-f8aaa599907cff765efdaa6f9875cb4c42746870.tar.lz yuzu-f8aaa599907cff765efdaa6f9875cb4c42746870.tar.xz yuzu-f8aaa599907cff765efdaa6f9875cb4c42746870.tar.zst yuzu-f8aaa599907cff765efdaa6f9875cb4c42746870.zip |
Diffstat (limited to 'src/core/hle')
-rw-r--r-- | src/core/hle/service/nvflinger/nvflinger.cpp | 9 |
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 { 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; - 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<s64>(((1000000000 * (1LL << swap_interval)) / (max_hertz * fps_cap)) * + speed_scale); } } // namespace Service::NVFlinger |