summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorSam Belliveau <sam.belliveau@gmail.com>2023-02-02 20:59:17 -0500
committerSam Belliveau <sam.belliveau@gmail.com>2023-02-02 20:59:17 -0500
commit4a97dc7c81ed99b22d6cd9da3afc9f3db7b9bbd8 (patch)
tree0b5aee79fcad8f31cdde0495338a1ac53a4cd050 /Source
parent87d5d39dfe4b7b90330ef2b4557a4e88d1ebf552 (diff)
Let VI Skip work if variance > fallback
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 093b136ed8..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 / 2;
+ 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