1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-02 09:03:37 +00:00

Don't call FrameBufferList::_findBuffer until buffer's actual height is not detected.

Otherwise wrong buffers can be removed.

Fixed auxilary buffers creation in Pokemon Stadium menu.
This commit is contained in:
Sergey Lipskiy 2015-03-11 20:59:06 +06:00
parent 5384e189c4
commit cbdacb58d8

View File

@ -345,11 +345,12 @@ void FrameBufferList::saveBuffer(u32 _address, u16 _format, u16 _size, u16 _widt
m_pCurrent->m_endAddress = min(RDRAMSize, m_pCurrent->m_startAddress + (((m_pCurrent->m_width * gDP.colorImage.height) << m_pCurrent->m_size >> 1) - 1));
if (!config.frameBufferEmulation.copyFromRDRAM && !m_pCurrent->m_isDepthBuffer && m_pCurrent->m_RdramCrc == 0 && !m_pCurrent->m_cfb && !m_pCurrent->m_cleared && gDP.colorImage.height > 1)
gDPFillRDRAM(m_pCurrent->m_startAddress, 0, 0, m_pCurrent->m_width, gDP.colorImage.height, m_pCurrent->m_width, m_pCurrent->m_size, m_pCurrent->m_fillcolor, false);
m_pCurrent = _findBuffer(m_pCurrent->m_startAddress, m_pCurrent->m_endAddress, m_pCurrent->m_width);
}
const u32 endAddress = _address + ((_width * (_height - 1)) << _size >> 1) - 1;
if (m_pCurrent == NULL || m_pCurrent->m_startAddress != _address || m_pCurrent->m_width != _width)
m_pCurrent = _findBuffer(_address, endAddress, _width);
m_pCurrent = findBuffer(_address);
if (m_pCurrent != NULL) {
if ((m_pCurrent->m_startAddress != _address) ||
(m_pCurrent->m_width != _width) ||