aboutsummaryrefslogtreecommitdiff
path: root/src/core/core_timing.cpp
diff options
context:
space:
mode:
authorGamer64 <gamer64@noreply.localhost>2025-06-27 13:45:54 +0000
committerGamer64 <gamer64@noreply.localhost>2025-06-27 13:45:54 +0000
commit059d89441e38fd4b2b72f4bdbc34d02aa765c709 (patch)
treedc254009ca7c72c8ed86da8258b1c2c70542bb8e /src/core/core_timing.cpp
parente7ddc647f39ffff6261e634671a6a4e0cff00e6c (diff)
[core, frontend] Add Custom CPU Ticks option (#217)
Co-authored-by: Gamer64 <76565986+Gamer64ytb@users.noreply.github.com> Co-authored-by: crueter <swurl@swurl.xyz> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/217
Diffstat (limited to 'src/core/core_timing.cpp')
-rw-r--r--src/core/core_timing.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/core_timing.cpp b/src/core/core_timing.cpp
index a8ffdb3cb7..3bd0d57e4d 100644
--- a/src/core/core_timing.cpp
+++ b/src/core/core_timing.cpp
@@ -172,7 +172,9 @@ void CoreTiming::UnscheduleEvent(const std::shared_ptr<EventType>& event_type,
}
void CoreTiming::AddTicks(u64 ticks_to_add) {
- cpu_ticks += ticks_to_add;
+ cpu_ticks = Settings::values.use_custom_cpu_ticks.GetValue()
+ ? Settings::values.cpu_ticks.GetValue()
+ : cpu_ticks + ticks_to_add;
downcount -= static_cast<s64>(cpu_ticks);
}