From 3a0cce575cc6b60e95a9f0848d857c0cc494200d Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 8 Jun 2014 14:44:54 -0700 Subject: [PATCH] Fix block transfer download with bpp mismatch. Pretty sure this will take care of #6258. --- GPU/GLES/Framebuffer.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/GPU/GLES/Framebuffer.cpp b/GPU/GLES/Framebuffer.cpp index 2510c21842..3688923478 100644 --- a/GPU/GLES/Framebuffer.cpp +++ b/GPU/GLES/Framebuffer.cpp @@ -2207,7 +2207,9 @@ bool FramebufferManager::NotifyBlockTransferBefore(u32 dstBasePtr, int dstStride } else if (srcBuffer) { WARN_LOG_ONCE(btd, G3D, "Block transfer download %08x -> %08x", srcBasePtr, dstBasePtr); if (g_Config.bBlockTransferGPU && (srcBuffer == currentRenderVfb_ || !srcBuffer->memoryUpdated)) { - ReadFramebufferToMemory(srcBuffer, true, srcX, srcY, srcWidth, srcHeight); + int srcBpp = srcBuffer->format == GE_FORMAT_8888 ? 4 : 2; + float srcXFactor = (float)bpp / srcBpp; + ReadFramebufferToMemory(srcBuffer, true, srcX * srcXFactor, srcY, srcWidth * srcXFactor, srcHeight); } return false; // Let the bit copy happen } else {