diff --git a/desmume/src/gfx3d.cpp b/desmume/src/gfx3d.cpp index ab487bf51..353de1504 100644 --- a/desmume/src/gfx3d.cpp +++ b/desmume/src/gfx3d.cpp @@ -1139,12 +1139,12 @@ void gfx3d_execute(u8 cmd, u32 param) static void gfx3d_FlushFIFO() { -#if 1 +#if 1 GFX_FIFOclear(); -#else +#else u32 cmd; u32 param; - + //INFO("GX FIFO tail at %i, GXstat 0x%08X\n", gxFIFO.tail, gxstat); if (gxFIFO.tail == 0) { @@ -1659,8 +1659,9 @@ void gfx3d_sendCommandToFIFO(u32 val) case 0x50: // SWAP_BUFFERS - Swap Rendering Engine Buffer (W) *(u32 *)(ARM9Mem.ARM9_REG + 0x540) = val; gfx3d_glFlush(val); - clCmd >>= 8; - clInd--; + // This is reseted by glFlush, thus not needed here (fixes dsracing.nds) + //clCmd >>= 8; + //clInd--; break; case 0x60: // VIEWPORT - Set Viewport (W) *(u32 *)(ARM9Mem.ARM9_REG + 0x580) = val;