aboutsummaryrefslogtreecommitdiff
path: root/src/core/core_timing.cpp
diff options
context:
space:
mode:
authorswurl <swurl@swurl.xyz>2025-05-29 08:19:51 +0000
committercrueter <crueter@noreply.localhost>2025-05-29 08:19:51 +0000
commitb78089e978331c113a0fcf0ce9e71f592d52a242 (patch)
tree724a0f42c765a66b545cfef060586620dffef055 /src/core/core_timing.cpp
parented47533be802b312c1fbc559190b3dfd07a462e5 (diff)
Fast CPU Time & Improved Fast GPU Time (#109)
needs android setting Signed-off-by: swurl <swurl@swurl.xyz> Co-authored-by: Aleksandr Popovich <alekpopo@pm.me> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/109 Co-authored-by: swurl <swurl@swurl.xyz> Co-committed-by: swurl <swurl@swurl.xyz>
Diffstat (limited to 'src/core/core_timing.cpp')
-rw-r--r--src/core/core_timing.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/core/core_timing.cpp b/src/core/core_timing.cpp
index 3d67ab9f5c..a8ffdb3cb7 100644
--- a/src/core/core_timing.cpp
+++ b/src/core/core_timing.cpp
@@ -192,13 +192,18 @@ u64 CoreTiming::GetClockTicks() const {
fres = Common::WallClock::CPUTickToCNTPCT(cpu_ticks);
}
+ if (Settings::values.use_fast_cpu_time) {
+ fres = (u64) ((double) fres
+ * (1.7 + 0.3 * (u32) Settings::values.fast_cpu_time.GetValue()));
+ }
+
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;
- }
+ }
}
u64 CoreTiming::GetGPUTicks() const {