From cab8d7ca01a18f1892c5d107517f6150a1361434 Mon Sep 17 00:00:00 2001 From: Jordan Woyak Date: Sat, 22 Nov 2025 05:02:38 -0600 Subject: [PATCH] CoreTiming: Fix percent speed display when "Rush Frame Presentation" is enabled. --- Source/Core/Core/CoreTiming.cpp | 7 +++++++ Source/Core/Core/HW/VideoInterface.cpp | 3 --- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Source/Core/Core/CoreTiming.cpp b/Source/Core/Core/CoreTiming.cpp index af5bc4731ce..a692e8db6f3 100644 --- a/Source/Core/Core/CoreTiming.cpp +++ b/Source/Core/Core/CoreTiming.cpp @@ -15,6 +15,7 @@ #include "Common/ChunkFile.h" #include "Common/Logging/Log.h" #include "Common/SPSCQueue.h" +#include "Common/ScopeGuard.h" #include "Core/AchievementManager.h" #include "Core/CPUThreadConfigCallback.h" @@ -449,6 +450,12 @@ void CoreTimingManager::Throttle(const s64 target_cycle) if (skip_throttle) return; + // Measure current performance after throttling. + Common::ScopeGuard perf_marker{[&] { + g_perf_metrics.CountPerformanceMarker(target_cycle, + m_system.GetSystemTimers().GetTicksPerSecond()); + }}; + if (IsSpeedUnlimited()) { ResetThrottle(target_cycle); diff --git a/Source/Core/Core/HW/VideoInterface.cpp b/Source/Core/Core/HW/VideoInterface.cpp index f97852df7aa..48b81916a5c 100644 --- a/Source/Core/Core/HW/VideoInterface.cpp +++ b/Source/Core/Core/HW/VideoInterface.cpp @@ -950,9 +950,6 @@ void VideoInterfaceManager::Update(u64 ticks) // Throttle before SI poll so user input is taken just before needed. (lower input latency) core_timing.Throttle(ticks); - // This is a nice place to measure performance so we don't have to Throttle elsewhere. - g_perf_metrics.CountPerformanceMarker(ticks, m_system.GetSystemTimers().GetTicksPerSecond()); - Core::UpdateInputGate(!Config::Get(Config::MAIN_INPUT_BACKGROUND_INPUT), Config::Get(Config::MAIN_LOCK_CURSOR)); auto& si = m_system.GetSerialInterface();