Renderer: Re-implement window size frame dumping

This was broken by hybrid XFB, and all frame dumping/screenshots occured
at the full internal resolution.
This commit is contained in:
Stenzek 2017-11-19 19:20:45 +10:00
parent 39559f6358
commit 8985cb2f0b

View File

@ -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<u32>(target_width) ||
m_dump_texture->GetConfig().height != static_cast<u32>(target_height))