1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-04 10:03:36 +00:00

Remove allocated frame buffer if its color depth is less then necessary.

Fixed Majora's Mask screen turns red #790

Problem description:
the game allocates 8bit aux frame buffer when enter to subscreen.
When screen shrink effect started, the game allocates 16bit buffer on the same address.
Since plugin already had buffer allocated, it reused that buffer. Since the buffer's
texture had only red component, whole screen turned red.

Fix: create new buffer if color depth of existing buffer is less than necessary.
This commit is contained in:
Sergey Lipskiy 2016-08-28 16:00:50 +07:00
parent 69870ad397
commit 3bfebd0910

View File

@ -582,7 +582,7 @@ void FrameBufferList::saveBuffer(u32 _address, u16 _format, u16 _size, u16 _widt
if ((m_pCurrent->m_startAddress != _address) ||
(m_pCurrent->m_width != _width) ||
//(current->height != height) ||
//(current->size != size) || // TODO FIX ME
(m_pCurrent->m_size < _size) ||
(m_pCurrent->m_scaleX != scaleX) ||
(m_pCurrent->m_scaleY != scaleY))
{