From 21774bdc8171799c0ab72d6d8653de496e82c4cd Mon Sep 17 00:00:00 2001 From: degasus Date: Tue, 8 Nov 2016 21:08:16 +0100 Subject: [PATCH] OGL: Only flush the frame dumping thread on dumping. This fixes the screenshot stutter, as this needs more than a frame. So we won't stall on the png writing at all until emulation stops or a new screenshot is requested. --- Source/Core/VideoBackends/OGL/Render.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/VideoBackends/OGL/Render.cpp b/Source/Core/VideoBackends/OGL/Render.cpp index b1fae3b98c..c6f04c3cd6 100644 --- a/Source/Core/VideoBackends/OGL/Render.cpp +++ b/Source/Core/VideoBackends/OGL/Render.cpp @@ -1450,7 +1450,6 @@ void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight, glBindFramebuffer(GL_READ_FRAMEBUFFER, 0); - FlushFrameDump(); DumpFrame(flipped_trc, ticks); // Finish up the current frame, print some stats @@ -1609,6 +1608,7 @@ void Renderer::DumpFrame(const TargetRectangle& flipped_trc, u64 ticks) } else { + FlushFrameDump(); std::swap(m_frame_dumping_pbo[0], m_frame_dumping_pbo[1]); std::swap(m_frame_pbo_is_mapped[0], m_frame_pbo_is_mapped[1]); std::swap(m_last_frame_width[0], m_last_frame_width[1]);