From 057cad228cbc44c6a0733e9e634c1eadffd4e1c5 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 14 Dec 2013 10:10:23 -0800 Subject: [PATCH 1/4] Upload block transfers to FBOs when from ram. --- GPU/GLES/GLES_GPU.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/GPU/GLES/GLES_GPU.cpp b/GPU/GLES/GLES_GPU.cpp index 4f8de349e6..fbc3665b45 100644 --- a/GPU/GLES/GLES_GPU.cpp +++ b/GPU/GLES/GLES_GPU.cpp @@ -1548,6 +1548,8 @@ void GLES_GPU::DoBlockTransfer() { // TODO: Notify all overlapping FBOs that they need to reload. textureCache_.Invalidate(dstBasePtr + (dstY * dstStride + dstX) * bpp, height * dstStride * bpp, GPU_INVALIDATE_HINT); + if (Memory::IsRAMAddress(srcBasePtr) && Memory::IsVRAMAddress(dstBasePtr)) + framebufferManager_.UpdateFromMemory(dstBasePtr, (dstY + height) * dstStride * bpp, true); // 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. From 20b81ef552fe45ebed7acb8ad6e67a4e74dec647 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 14 Dec 2013 11:18:08 -0800 Subject: [PATCH 2/4] Don't try to seek the video with too few packets. Conservatively we seem to need approximately 6, which any video ought to be longer than. --- Core/HW/MediaEngine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/HW/MediaEngine.cpp b/Core/HW/MediaEngine.cpp index 4e4b3d0d8c..542fe67418 100644 --- a/Core/HW/MediaEngine.cpp +++ b/Core/HW/MediaEngine.cpp @@ -333,7 +333,7 @@ int MediaEngine::addStreamData(u8* buffer, int addSize) { m_demux->demux(m_audioStream); } #ifdef USE_FFMPEG - if (!m_pFormatCtx) { + if (!m_pFormatCtx && m_pdata->getQueueSize() >= 2048 * 6) { m_pdata->get_front(m_mpegheader, sizeof(m_mpegheader)); int mpegoffset = bswap32(*(int*)(m_mpegheader + 8)); m_pdata->pop_front(0, mpegoffset); From 3204ec94fb6ba4b3c12d2c274463c68db86f30fc Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 14 Dec 2013 11:33:32 -0800 Subject: [PATCH 3/4] Forget video end when more packets are added. Good for looping videos, for example Burnout. --- Core/HW/MediaEngine.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Core/HW/MediaEngine.cpp b/Core/HW/MediaEngine.cpp index 542fe67418..a933ea83f0 100644 --- a/Core/HW/MediaEngine.cpp +++ b/Core/HW/MediaEngine.cpp @@ -340,6 +340,9 @@ int MediaEngine::addStreamData(u8* buffer, int addSize) { openContext(); } #endif // USE_FFMPEG + + // We added data, so... not the end anymore? + m_isVideoEnd = false; } return size; } From 7bbbf4d4b6afb85cc76b0a284ffc7240ef0a0377 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 14 Dec 2013 01:27:40 -0800 Subject: [PATCH 4/4] Typo. --- Core/HLE/sceNet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/HLE/sceNet.cpp b/Core/HLE/sceNet.cpp index db845942e0..85d68d8d4c 100644 --- a/Core/HLE/sceNet.cpp +++ b/Core/HLE/sceNet.cpp @@ -394,7 +394,7 @@ const HLEFunction sceNetInet[] = { {0xcda85c99, WrapI_IUUU, "sceNetInetRecv"}, {0xc91142e4, 0, "sceNetInetRecvfrom"}, {0xeece61d2, 0, "sceNetInetRecvmsg"}, - {0x7aa671bc, WrapI_IUUU, "sceNetInetSend"}, + {0x7aa671bc, WrapI_IUUU, "sceNetInetSend"}, {0x05038fc7, 0, "sceNetInetSendto"}, {0x774e36f4, 0, "sceNetInetSendmsg"}, {0xfbabe411, WrapI_V, "sceNetInetGetErrno"},