CoreTiming: Fix percent speed display when "Rush Frame Presentation" is enabled.

This commit is contained in:
Jordan Woyak 2025-11-22 05:02:38 -06:00
parent e526c1ffde
commit cab8d7ca01
2 changed files with 7 additions and 3 deletions

View File

@ -15,6 +15,7 @@
#include "Common/ChunkFile.h" #include "Common/ChunkFile.h"
#include "Common/Logging/Log.h" #include "Common/Logging/Log.h"
#include "Common/SPSCQueue.h" #include "Common/SPSCQueue.h"
#include "Common/ScopeGuard.h"
#include "Core/AchievementManager.h" #include "Core/AchievementManager.h"
#include "Core/CPUThreadConfigCallback.h" #include "Core/CPUThreadConfigCallback.h"
@ -449,6 +450,12 @@ void CoreTimingManager::Throttle(const s64 target_cycle)
if (skip_throttle) if (skip_throttle)
return; return;
// Measure current performance after throttling.
Common::ScopeGuard perf_marker{[&] {
g_perf_metrics.CountPerformanceMarker(target_cycle,
m_system.GetSystemTimers().GetTicksPerSecond());
}};
if (IsSpeedUnlimited()) if (IsSpeedUnlimited())
{ {
ResetThrottle(target_cycle); ResetThrottle(target_cycle);

View File

@ -950,9 +950,6 @@ void VideoInterfaceManager::Update(u64 ticks)
// Throttle before SI poll so user input is taken just before needed. (lower input latency) // Throttle before SI poll so user input is taken just before needed. (lower input latency)
core_timing.Throttle(ticks); 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), Core::UpdateInputGate(!Config::Get(Config::MAIN_INPUT_BACKGROUND_INPUT),
Config::Get(Config::MAIN_LOCK_CURSOR)); Config::Get(Config::MAIN_LOCK_CURSOR));
auto& si = m_system.GetSerialInterface(); auto& si = m_system.GetSerialInterface();