From a73b8dddbda436cae3cc7ff7f1abe724b129c585 Mon Sep 17 00:00:00 2001 From: Sergey Lipskiy Date: Sun, 20 Sep 2015 20:28:05 +0600 Subject: [PATCH] Fix bug in FrameBufferList::saveBuffer : corrent end address for auxiliary buffer only if it was not corrected by correctHeight(). --- src/FrameBuffer.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/FrameBuffer.cpp b/src/FrameBuffer.cpp index acdc7d44..fc749166 100644 --- a/src/FrameBuffer.cpp +++ b/src/FrameBuffer.cpp @@ -450,9 +450,10 @@ void FrameBufferList::saveBuffer(u32 _address, u16 _format, u16 _size, u16 _widt OGLVideo & ogl = video(); if (m_pCurrent != NULL) { if (gDP.colorImage.height > 0) { - if (m_pCurrent->m_width == VI.width) + if (m_pCurrent->m_width == VI.width || m_pCurrent->m_needHeightCorrection) { gDP.colorImage.height = min(gDP.colorImage.height, VI.height); - m_pCurrent->m_endAddress = min(RDRAMSize, m_pCurrent->m_startAddress + (((m_pCurrent->m_width * gDP.colorImage.height) << m_pCurrent->m_size >> 1) - 1)); + m_pCurrent->m_endAddress = min(RDRAMSize, m_pCurrent->m_startAddress + (((m_pCurrent->m_width * gDP.colorImage.height) << m_pCurrent->m_size >> 1) - 1)); + } if (!m_pCurrent->_isMarioTennisScoreboard() && !m_pCurrent->m_isDepthBuffer && !m_pCurrent->m_copiedToRdram && !m_pCurrent->m_cfb && !m_pCurrent->m_cleared && m_pCurrent->m_RdramCopy.empty() && gDP.colorImage.height > 1) { m_pCurrent->copyRdram(); }