GPU: Ensure pending time is used in events

Fixes long delay in Syphon Filter.
This commit is contained in:
Connor McLaughlin 2020-08-02 14:09:19 +10:00
parent 75156b76af
commit 4d9c2c1b6c

View file

@ -769,6 +769,7 @@ void GPU::CRTCTickEvent(TickCount ticks)
void GPU::CommandTickEvent(TickCount ticks)
{
m_pending_command_ticks -= SystemTicksToGPUTicks(ticks);
m_command_tick_event->Deactivate();
// we can be syncing if this came from a DMA write. recursively executing commands would be bad.
if (!m_syncing)
@ -777,15 +778,10 @@ void GPU::CommandTickEvent(TickCount ticks)
UpdateGPUIdle();
if (m_pending_command_ticks <= 0)
{
m_pending_command_ticks = 0;
m_command_tick_event->Deactivate();
}
else
{
m_command_tick_event->SetIntervalAndSchedule(GPUTicksToSystemTicks(m_pending_command_ticks));
}
}
void GPU::UpdateCommandTickEvent()
{