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

Fix FrameBuffer::copyRdram(): fingerprint size must be not less than 4.

Fixed validity check for PD cloacking effect, #839
This commit is contained in:
Sergey Lipskiy 2016-05-07 23:20:10 +06:00
parent 05cfca2ec6
commit 2054d9d689

View File

@ -335,7 +335,7 @@ void FrameBuffer::copyRdram()
// This is necessary for auxilary buffers: game can restore content of RDRAM when buffer is not needed anymore
// Thus content of RDRAM on moment of buffer creation will be the same as when buffer becomes obsolete.
// Validity check will see that the RDRAM is the same and thus the buffer is valid, which is false.
const u32 twoPercent = dataSize / 200;
const u32 twoPercent = max(4U, dataSize / 200);
u32 start = m_startAddress >> 2;
u32 * pData = (u32*)RDRAM;
for (u32 i = 0; i < twoPercent; ++i) {