diff --git a/src/common/settings.h b/src/common/settings.h index 1fe7ef8710..f3d92802bf 100644 --- a/src/common/settings.h +++ b/src/common/settings.h @@ -522,6 +522,10 @@ struct Values { SwitchableSetting preload_textures{false, "preload_textures"}; SwitchableSetting async_custom_loading{true, "async_custom_loading"}; + // Tweaks + SwitchableSetting enable_custom_cpu_ticks{false, "enable_custom_cpu_ticks"}; + SwitchableSetting custom_cpu_ticks{16000, 77, 65535, "custom_cpu_ticks"}; + // Audio bool audio_muted; SwitchableSetting audio_emulation{AudioEmulation::HLE, "audio_emulation"}; diff --git a/src/core/core_timing.cpp b/src/core/core_timing.cpp index 0d25069183..57881018d4 100644 --- a/src/core/core_timing.cpp +++ b/src/core/core_timing.cpp @@ -176,7 +176,10 @@ u64 Timing::Timer::GetTicks() const { } void Timing::Timer::AddTicks(u64 ticks) { - downcount -= static_cast(ticks * cpu_clock_scale); + downcount -= static_cast((Settings::values.enable_custom_cpu_ticks + ? Settings::values.custom_cpu_ticks.GetValue() + : ticks) * + cpu_clock_scale); } u64 Timing::Timer::GetIdleTicks() const {