summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorJMC47 <JMC4789@gmail.com>2023-02-03 15:09:50 -0500
committerGitHub <noreply@github.com>2023-02-03 15:09:50 -0500
commitaece99fe41d753866a545b3c8e821aa4a42e0512 (patch)
tree048d67c3d1377218f193391ff52e66779b730eb5 /Source
parent46b99671d9158e0ca840c1d8ef249db0f321ced7 (diff)
parent4a97dc7c81ed99b22d6cd9da3afc9f3db7b9bbd8 (diff)
Merge pull request #11533 from Sam-Belliveau/smoother-vi-skip
Set VI Skip Activation to Half The Audio Buffer
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/Core/CoreTiming.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Core/Core/CoreTiming.cpp b/Source/Core/Core/CoreTiming.cpp
index 4acdebea70..aa7c501c92 100644
--- a/Source/Core/Core/CoreTiming.cpp
+++ b/Source/Core/Core/CoreTiming.cpp
@@ -386,7 +386,7 @@ void CoreTimingManager::Throttle(const s64 target_cycle)
// It doesn't matter what amount of lag we skip VI at, as long as it's constant.
const DT max_variance =
std::chrono::duration_cast<DT>(DT_ms(Config::Get(Config::MAIN_TIMING_VARIANCE)));
- const TimePoint vi_deadline = time - max_variance;
+ const TimePoint vi_deadline = time - std::min(max_fallback, max_variance) / 2;
m_throttle_disable_vi_int = 0.0 < speed && m_throttle_deadline < vi_deadline;
// Only sleep if we are behind the deadline