diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp index 607732b550..f2c9ba27ff 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp @@ -791,11 +791,24 @@ void Renderer::ClearScreen(const EFBRectangle& rc, bool colorEnable, bool alphaE void Renderer::RenderToXFB(u32 xfbAddr, u32 fbWidth, u32 fbHeight, const EFBRectangle& sourceRc) { + g_VideoInitialize.pCopiedToXFB(false); + +#ifdef XXX_ENABLE_CPU_CONTROLLED_SWAPPING // If we're about to write to a requested XFB, make sure the previous // contents make it to the screen first. VideoFifo_CheckSwapRequestAt(xfbAddr, fbWidth, fbHeight); s_framebufferManager.CopyToXFB(xfbAddr, fbWidth, fbHeight, sourceRc); +#else + s_framebufferManager.CopyToXFB(xfbAddr, fbWidth, fbHeight, sourceRc); + + // XXX: Without the VI, how would we know what kind of field this is? So + // just use progressive. + Renderer::Swap(xfbAddr, FIELD_PROGRESSIVE, fbWidth, fbHeight); + + // TODO: Find better name for this because I don't know if it means what it says. + g_VideoInitialize.pCopiedToXFB(true); +#endif } // This function has the final picture. We adjust the aspect ratio here. diff --git a/Source/Plugins/Plugin_VideoOGL/Src/main.cpp b/Source/Plugins/Plugin_VideoOGL/Src/main.cpp index b54ad2321a..1e39b57333 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/main.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/main.cpp @@ -461,10 +461,12 @@ void VideoFifo_CheckSwapRequest() { if (Common::AtomicLoadAcquire(s_swapRequested)) { +#ifdef XXX_ENABLE_CPU_CONTROLLED_SWAPPING Renderer::Swap(s_beginFieldArgs.xfbAddr, s_beginFieldArgs.field, s_beginFieldArgs.fbWidth, s_beginFieldArgs.fbHeight); // TODO: Find better name for this because I don't know if it means what it says. g_VideoInitialize.pCopiedToXFB(true); +#endif Common::AtomicStoreRelease(s_swapRequested, FALSE); } @@ -478,8 +480,6 @@ inline bool addrRangesOverlap(u32 aLower, u32 aUpper, u32 bLower, u32 bUpper) // Run from the graphics thread (from Fifo.cpp) void VideoFifo_CheckSwapRequestAt(u32 xfbAddr, u32 fbWidth, u32 fbHeight) { - g_VideoInitialize.pCopiedToXFB(false); - if (Common::AtomicLoadAcquire(s_swapRequested)) { u32 aLower = xfbAddr;