probably unborks gxfifo stalls

This commit is contained in:
Jaklyy 2024-12-13 13:15:38 -05:00
parent 73be2f3e01
commit 642f085975
1 changed files with 3 additions and 3 deletions

View File

@ -2378,13 +2378,13 @@ void GPU3D::Run() noexcept
if (!GeometryEnabled || FlushRequest || if (!GeometryEnabled || FlushRequest ||
(CmdPIPE.IsEmpty() && !(GXStat & (1<<27)))) (CmdPIPE.IsEmpty() && !(GXStat & (1<<27))))
{ {
Timestamp = NDS.ARM9Timestamp >> NDS.ARM9ClockShift; Timestamp = std::max(NDS.ARM9Timestamp, NDS.DMA9Timestamp) >> NDS.ARM9ClockShift;
return; return;
} }
s32 cycles = (NDS.ARM9Timestamp >> NDS.ARM9ClockShift) - Timestamp; s32 cycles = (std::max(NDS.ARM9Timestamp, NDS.DMA9Timestamp) >> NDS.ARM9ClockShift) - Timestamp;
CycleCount -= cycles; CycleCount -= cycles;
Timestamp = NDS.ARM9Timestamp >> NDS.ARM9ClockShift; Timestamp = std::max(NDS.ARM9Timestamp, NDS.DMA9Timestamp) >> NDS.ARM9ClockShift;
if (CycleCount <= 0) if (CycleCount <= 0)
{ {