From 7a299fb1f2677d49bb8a0dd41482ec63ac6b2a42 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Fri, 6 Jun 2014 21:11:58 -0700 Subject: [PATCH] Avoid displaying a wrong-format framebuf. --- GPU/GLES/Framebuffer.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/GPU/GLES/Framebuffer.cpp b/GPU/GLES/Framebuffer.cpp index 306daec76b..065efd5988 100644 --- a/GPU/GLES/Framebuffer.cpp +++ b/GPU/GLES/Framebuffer.cpp @@ -1180,6 +1180,15 @@ void FramebufferManager::CopyDisplayToOutput() { } } + if (vfb && vfb->format != displayFormat_) { + if (vfb->last_frame_render + FBO_OLD_AGE < gpuStats.numFlips) { + // The game probably switched formats on us. + vfb->format = displayFormat_; + } else { + vfb = 0; + } + } + if (!vfb) { if (Memory::IsValidAddress(displayFramebufPtr_)) { // The game is displaying something directly from RAM. In GTA, it's decoded video.