1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-06-30 08:24:05 +00:00

Set m_cleared to false in FrameBuffer::copyRdram().

m_cleared means that the RDRAM buffer contains only fillcolor.
It should be false after copyRdram() since from now the buffer validity check should work with m_RdramCopy.

It Fixes Kirby 64 broken level selection, #2491
Without this fix, the level selection is broken when copy color to RDRAM is disabled
This commit is contained in:
Sergey Lipskiy 2021-05-15 20:43:05 +07:00
parent 6b94f41df6
commit 7abf593da3
2 changed files with 3 additions and 4 deletions

View File

@ -224,7 +224,6 @@ void ColorBufferToRDRAM::_copy(u32 _startAddress, u32 _endAddress, bool _sync)
m_pCurFrameBuffer->m_copiedToRdram = true;
m_pCurFrameBuffer->copyRdram();
m_pCurFrameBuffer->m_cleared = false;
m_pCurFrameBuffer->cleanUp();
@ -282,6 +281,4 @@ void copyWhiteToRDRAM(FrameBuffer * _pBuffer)
}
_pBuffer->m_copiedToRdram = true;
_pBuffer->copyRdram();
_pBuffer->m_cleared = false;
}

View File

@ -218,6 +218,9 @@ void FrameBuffer::copyRdram()
const u32 height = _cutHeight(m_startAddress, m_height, stride);
if (height == 0)
return;
m_cleared = false;
const u32 dataSize = stride * height;
// Auxiliary frame buffer
@ -235,7 +238,6 @@ void FrameBuffer::copyRdram()
else
pData[start++] = 0;
}
m_cleared = false;
m_fingerprint = true;
return;
}