Avoid multiple flips per frame, fixes immediate flip for God of War

This commit is contained in:
Henrik Rydgård 2017-12-01 15:31:16 +01:00
parent 4c720631c1
commit 54ff4c8822

View File

@ -853,6 +853,7 @@ void __DisplaySetFramebuf(u32 topaddr, int linesize, int pixelFormat, int sync)
framebuf = fbstate;
gpu->SetDisplayFramebuffer(framebuf.topaddr, framebuf.stride, framebuf.fmt);
// IMMEDIATE means that the buffer is fine. We can just flip immediately.
if (!flippedThisFrame)
__DisplayFlip(0);
} else {
// Delay the write until vblank