From 8985cb2f0be5cbd831b537c7fa8dc15c5d7222bc Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sun, 19 Nov 2017 19:20:45 +1000 Subject: [PATCH] Renderer: Re-implement window size frame dumping This was broken by hybrid XFB, and all frame dumping/screenshots occured at the full internal resolution. --- Source/Core/VideoCommon/RenderBase.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Source/Core/VideoCommon/RenderBase.cpp b/Source/Core/VideoCommon/RenderBase.cpp index b0d7c07dd1..4a46475344 100644 --- a/Source/Core/VideoCommon/RenderBase.cpp +++ b/Source/Core/VideoCommon/RenderBase.cpp @@ -711,8 +711,18 @@ void Renderer::DoDumpFrame() void Renderer::UpdateFrameDumpTexture() { int target_width, target_height; - std::tie(target_width, target_height) = CalculateOutputDimensions( - m_last_xfb_texture->GetConfig().width, m_last_xfb_texture->GetConfig().height); + if (!g_ActiveConfig.bInternalResolutionFrameDumps) + { + auto target_rect = GetTargetRectangle(); + target_width = target_rect.GetWidth(); + target_height = target_rect.GetHeight(); + } + else + { + std::tie(target_width, target_height) = CalculateOutputDimensions( + m_last_xfb_texture->GetConfig().width, m_last_xfb_texture->GetConfig().height); + } + if (m_dump_texture == nullptr || m_dump_texture->GetConfig().width != static_cast(target_width) || m_dump_texture->GetConfig().height != static_cast(target_height))