diff options
author | bunnei <bunneidev@gmail.com> | 2022-07-16 22:26:47 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2022-07-17 08:11:42 +0200 |
commit | 6d160873c4c6a963057da5c3dca5c5f26e810052 (patch) | |
tree | 3496f9b8c01547235751c8de99989fc969f3e269 /src/core/hle/service | |
parent | yuzu: settings: Remove framerate cap and merge unlocked framerate setting. (diff) | |
download | yuzu-6d160873c4c6a963057da5c3dca5c5f26e810052.tar yuzu-6d160873c4c6a963057da5c3dca5c5f26e810052.tar.gz yuzu-6d160873c4c6a963057da5c3dca5c5f26e810052.tar.bz2 yuzu-6d160873c4c6a963057da5c3dca5c5f26e810052.tar.lz yuzu-6d160873c4c6a963057da5c3dca5c5f26e810052.tar.xz yuzu-6d160873c4c6a963057da5c3dca5c5f26e810052.tar.zst yuzu-6d160873c4c6a963057da5c3dca5c5f26e810052.zip |
Diffstat (limited to 'src/core/hle/service')
-rw-r--r-- | src/core/hle/service/nvflinger/nvflinger.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/hle/service/nvflinger/nvflinger.cpp b/src/core/hle/service/nvflinger/nvflinger.cpp index 798c4d3a7..5574269eb 100644 --- a/src/core/hle/service/nvflinger/nvflinger.cpp +++ b/src/core/hle/service/nvflinger/nvflinger.cpp @@ -298,7 +298,10 @@ s64 NVFlinger::GetNextTicks() const { speed_scale = 0.01f; } } - return static_cast<s64>(((1000000000 * (1LL << swap_interval)) / max_hertz) * speed_scale); + + const auto next_ticks = ((1000000000 * (1LL << swap_interval)) / max_hertz); + + return static_cast<s64>(speed_scale * static_cast<float>(next_ticks)); } } // namespace Service::NVFlinger |