From dc3da06a6817cb493ae441270fff5766ed12402a Mon Sep 17 00:00:00 2001 From: purplemarshmallow Date: Sat, 31 Oct 2015 03:39:14 +0100 Subject: [PATCH] as suggested by gonetz buffers are now also copied after the buffer changed in SetColorImage command now the copy auxiliary option also works if a buffer is used in the current frame --- src/FrameBuffer.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/FrameBuffer.cpp b/src/FrameBuffer.cpp index 58c688fd..b26e75ae 100644 --- a/src/FrameBuffer.cpp +++ b/src/FrameBuffer.cpp @@ -458,6 +458,13 @@ FrameBuffer * FrameBufferList::findTmpBuffer(u32 _address) void FrameBufferList::saveBuffer(u32 _address, u16 _format, u16 _size, u16 _width, u16 _height, bool _cfb) { + if (m_pCurrent != NULL && config.frameBufferEmulation.copyAuxToRDRAM != 0) { + if (m_pCurrent->m_width != VI.width) { + FrameBuffer_CopyToRDRAM(m_pCurrent->m_startAddress); + removeBuffer(m_pCurrent->m_startAddress); + } + } + if (VI.width == 0 || _height == 0) { m_pCurrent = NULL; glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);