From 0671ea1b02e038e9cd5dd464267e05d5e9882656 Mon Sep 17 00:00:00 2001 From: Sergey Lipskiy Date: Mon, 27 Feb 2017 17:32:20 +0700 Subject: [PATCH] Code cleanup: correct aux buffer detection in FrameBufferList::copyAux() and FrameBufferList::removeAux() --- src/FrameBuffer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/FrameBuffer.cpp b/src/FrameBuffer.cpp index a0cded72..071e58f4 100644 --- a/src/FrameBuffer.cpp +++ b/src/FrameBuffer.cpp @@ -700,7 +700,7 @@ void FrameBufferList::saveBuffer(u32 _address, u16 _format, u16 _size, u16 _widt void FrameBufferList::copyAux() { for (auto iter = m_list.begin(); iter != m_list.end(); ++iter) { - if (iter->m_width != VI.width && iter->m_height != VI.height) + if (iter->isAuxiliary()) FrameBuffer_CopyToRDRAM(iter->m_startAddress, true); } } @@ -708,7 +708,7 @@ void FrameBufferList::copyAux() void FrameBufferList::removeAux() { for (auto iter = m_list.begin(); iter != m_list.end(); ++iter) { - while (iter->m_width != VI.width && iter->m_height != VI.height) { + while (iter->isAuxiliary()) { if (&(*iter) == m_pCurrent) { m_pCurrent = nullptr; gfxContext.bindFramebuffer(bufferTarget::DRAW_FRAMEBUFFER, ObjectHandle::null);