diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/GPU3D.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/GPU3D.cpp b/src/GPU3D.cpp index 939cb8a..6f7e7b7 100644 --- a/src/GPU3D.cpp +++ b/src/GPU3D.cpp @@ -1570,7 +1570,7 @@ void ExecuteCommand() break; case 0x50: // flush - FlushRequest = 1; + FlushRequest |= 0x1; FlushAttributes = ExecParams[0] & 0x3; CycleCount = 392; break; @@ -1592,7 +1592,7 @@ void ExecuteCommand() void Run(s32 cycles) { - if (FlushRequest) + if (FlushRequest & 0x1) return; if (CycleCount <= 0 && CmdPIPE->IsEmpty()) return; @@ -1635,7 +1635,7 @@ void CheckFIFODMA() void VBlank() { - if (FlushRequest) + if (FlushRequest & 0x1) { RenderVertexRAM = CurVertexRAM; RenderPolygonRAM = CurPolygonRAM; @@ -1647,6 +1647,9 @@ void VBlank() NumVertices = 0; NumPolygons = 0; + + FlushRequest &= ~0x1; + FlushRequest |= 0x2; } } @@ -1655,11 +1658,11 @@ void VCount215() // TODO: detect other conditions that could require rerendering // the DS is said to present new 3D frames all the time, even if no commands are sent - if (FlushRequest) + if (FlushRequest & 0x2) { SoftRenderer::RenderFrame(RenderVertexRAM, RenderPolygonRAM, RenderNumPolygons); - FlushRequest = 0; + FlushRequest &= ~0x2; } } |