From 642f085975ba4ec934a27e7f8813c3cfdae35aef Mon Sep 17 00:00:00 2001 From: Jaklyy <102590697+Jaklyy@users.noreply.github.com> Date: Fri, 13 Dec 2024 13:15:38 -0500 Subject: [PATCH] probably unborks gxfifo stalls --- src/GPU3D.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/GPU3D.cpp b/src/GPU3D.cpp index 4a1426aa..953a2343 100644 --- a/src/GPU3D.cpp +++ b/src/GPU3D.cpp @@ -2378,13 +2378,13 @@ void GPU3D::Run() noexcept if (!GeometryEnabled || FlushRequest || (CmdPIPE.IsEmpty() && !(GXStat & (1<<27)))) { - Timestamp = NDS.ARM9Timestamp >> NDS.ARM9ClockShift; + Timestamp = std::max(NDS.ARM9Timestamp, NDS.DMA9Timestamp) >> NDS.ARM9ClockShift; return; } - s32 cycles = (NDS.ARM9Timestamp >> NDS.ARM9ClockShift) - Timestamp; + s32 cycles = (std::max(NDS.ARM9Timestamp, NDS.DMA9Timestamp) >> NDS.ARM9ClockShift) - Timestamp; CycleCount -= cycles; - Timestamp = NDS.ARM9Timestamp >> NDS.ARM9ClockShift; + Timestamp = std::max(NDS.ARM9Timestamp, NDS.DMA9Timestamp) >> NDS.ARM9ClockShift; if (CycleCount <= 0) {