Merge pull request #6574 from stenzek/framedump-texture

Renderer: Only recreate frame dump texture if dimensions differ
This commit is contained in:
Léo Lam 2018-04-01 17:45:11 +02:00 committed by GitHub
commit 592b20c78e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -755,7 +755,7 @@ void Renderer::RenderFrameDump()
// Or, resize texture if it isn't large enough to accommodate the current frame.
if (!m_frame_dump_render_texture ||
m_frame_dump_render_texture->GetConfig().width != static_cast<u32>(target_width) ||
m_frame_dump_render_texture->GetConfig().height == static_cast<u32>(target_height))
m_frame_dump_render_texture->GetConfig().height != static_cast<u32>(target_height))
{
// Recreate texture objects. Release before creating so we don't temporarily use twice the RAM.
TextureConfig config(target_width, target_height, 1, 1, 1, AbstractTextureFormat::RGBA8, true);