diff options
| author | spectranator <spectranator@y2nlvhmmk5jnsvechppxnbyzmmv3vbl7dvzn6ltwcdbpgxixp3clkgqd.onion> | 2024-05-19 15:30:32 +0200 |
|---|---|---|
| committer | Mike Lothian <mike@fireburn.co.uk> | 2024-12-20 15:24:57 +0000 |
| commit | 0b587b91c93cebce2d729b5437efd7451a33ee25 (patch) | |
| tree | efba571f9ea08924a943c1ce4d37851c11460930 /src | |
| parent | 701f391d00fd2ecf597c46b1fe045708b20b3078 (diff) | |
Simplified CoreTiming::GetClockTicks()
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/core_timing.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/core_timing.cpp b/src/core/core_timing.cpp index 057688269..bde8758d3 100644 --- a/src/core/core_timing.cpp +++ b/src/core/core_timing.cpp @@ -194,11 +194,12 @@ u64 CoreTiming::GetClockTicks() const { if (Settings::values.sync_core_speed.GetValue()) { const double ticks = static_cast<double>(fres); - const double speed_limit = static_cast<double>(Settings::values.speed_limit.GetValue())*0.01; - return static_cast<u64>(ticks/speed_limit); - } else { - return fres; + const double speed_limit = + static_cast<double>(Settings::values.speed_limit.GetValue()) * 0.01; + fres = static_cast<u64>(ticks / speed_limit); } + + return fres; } u64 CoreTiming::GetGPUTicks() const { |
