From c54664ba89c4d6453dd5be4b696013838aca0cc3 Mon Sep 17 00:00:00 2001 From: raven02 Date: Fri, 9 May 2014 23:32:26 +0800 Subject: [PATCH] Validate the size framebuffer size with the szie from sceDmac --- GPU/GLES/Framebuffer.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/GPU/GLES/Framebuffer.cpp b/GPU/GLES/Framebuffer.cpp index ba3ebd914c..6116dc0736 100644 --- a/GPU/GLES/Framebuffer.cpp +++ b/GPU/GLES/Framebuffer.cpp @@ -1624,11 +1624,10 @@ std::vector FramebufferManager::GetFramebufferList() { return list; } -// MotoGP workaround void FramebufferManager::NotifyFramebufferCopy(u32 src, u32 dest, int size) { for (size_t i = 0; i < vfbs_.size(); i++) { - // This size fits for MotoGP. Might want to make this more flexible for other games if they do the same. - if ((vfbs_[i]->fb_address | 0x04000000) == src && size == 512 * 272 * 2) { + int fsize = vfbs_[i]->fb_stride * vfbs_[i]->height * (vfbs_[i]->format == GE_FORMAT_8888 ? 4 : 2); + if ((vfbs_[i]->fb_address | 0x04000000) == src && size == fsize ) { // A framebuffer matched! knownFramebufferCopies_.insert(std::pair(src, dest)); }