CoreTiming: Don't Throttle in event queue processing.

This commit is contained in:
Jordan Woyak 2025-03-06 02:11:10 -06:00
parent 5ed8b7bc9d
commit 81e842e2aa
2 changed files with 0 additions and 13 deletions

View File

@ -18,7 +18,6 @@
#include "Core/AchievementManager.h"
#include "Core/CPUThreadConfigCallback.h"
#include "Core/Config/AchievementSettings.h"
#include "Core/Config/MainSettings.h"
#include "Core/Core.h"
#include "Core/PowerPC/PowerPC.h"
@ -333,8 +332,6 @@ void CoreTimingManager::Advance()
Event evt = std::move(m_event_queue.front());
std::ranges::pop_heap(m_event_queue, std::ranges::greater{});
m_event_queue.pop_back();
Throttle(evt.time);
evt.type->callback(m_system, evt.userdata, m_globals.global_timer - evt.time);
}
@ -360,11 +357,6 @@ void CoreTimingManager::Throttle(const s64 target_cycle)
{
// Based on number of cycles and emulation speed, increase the target deadline
const s64 cycles = target_cycle - m_throttle_last_cycle;
// Prevent any throttling code if the amount of time passed is < ~0.122ms
if (cycles < m_throttle_min_clock_per_sleep)
return;
m_throttle_last_cycle = target_cycle;
const double speed = Core::GetIsThrottlerTempDisabled() ? 0.0 : m_emulation_speed;
@ -442,7 +434,6 @@ void CoreTimingManager::LogPendingEvents() const
void CoreTimingManager::AdjustEventQueueTimes(u32 new_ppc_clock, u32 old_ppc_clock)
{
m_throttle_clock_per_sec = new_ppc_clock;
m_throttle_min_clock_per_sleep = new_ppc_clock / 1200;
for (Event& ev : m_event_queue)
{

View File

@ -16,7 +16,6 @@
// inside callback:
// ScheduleEvent(periodInCycles - cyclesLate, callback, "whatever")
#include <compare>
#include <mutex>
#include <string>
#include <tuple>
@ -156,8 +155,6 @@ public:
Globals& GetGlobals() { return m_globals; }
// Throttle the CPU to the specified target cycle.
// Never used outside of CoreTiming, however it remains public
// in order to allow custom throttling implementations to be tested.
void Throttle(const s64 target_cycle);
TimePoint GetCPUTimePoint(s64 cyclesLate) const; // Used by Dolphin Analytics
@ -203,7 +200,6 @@ private:
s64 m_throttle_last_cycle = 0;
TimePoint m_throttle_deadline = Clock::now();
s64 m_throttle_clock_per_sec = 0;
s64 m_throttle_min_clock_per_sleep = 0;
bool m_throttle_disable_vi_int = false;
DT m_max_fallback = {};