Detect a method that some games use to get video on the screen. No more need to turn on raw framebuffer in these cases (this may not catch all of them).

This commit is contained in:
Henrik Rydgard 2013-06-05 23:03:42 +02:00
parent 2221f221e3
commit 44042b0ef9

View File

@ -1004,6 +1004,16 @@ void GLES_GPU::DoBlockTransfer() {
// TODO: Notify all overlapping FBOs that they need to reload.
textureCache_.Invalidate(dstBasePtr + dstY * dstStride + dstX, height * dstStride + width * bpp, GPU_INVALIDATE_HINT);
// A few games use this INSTEAD of actually drawing the video image to the screen, they just blast it to
// the backbuffer. Detect this and have the framebuffermanager draw the pixels.
u32 backBuffer = 0x04000000 | framebufferManager_.PrevDisplayFramebufAddr();
if (dstBasePtr == backBuffer && width == 512 && height == 272) {
framebufferManager_.DrawPixels(Memory::GetPointer(dstBasePtr), 3, 512);
}
}
void GLES_GPU::InvalidateCache(u32 addr, int size, GPUInvalidationType type) {