mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-04 10:03:36 +00:00
Don't save depth buffer when found buffer's width is less than VI.width.
Otherwise out of memory writes are possible. That may happen when switching from interlaced to non-interlaced mode. Fixed crash/freeze in Perfect Dark, issue #285
This commit is contained in:
parent
10239fe610
commit
395eb362f1
|
@ -938,7 +938,7 @@ bool DepthBufferToRDRAM::CopyToRDRAM( u32 _address) {
|
|||
if (m_lastDList == RSP.DList) // Already read;
|
||||
return false;
|
||||
FrameBuffer *pBuffer = frameBufferList().findBuffer(_address);
|
||||
if (pBuffer == NULL || pBuffer->m_pDepthBuffer == NULL || !pBuffer->m_pDepthBuffer->m_cleared)
|
||||
if (pBuffer == NULL || pBuffer->m_width < VI.width || pBuffer->m_pDepthBuffer == NULL || !pBuffer->m_pDepthBuffer->m_cleared)
|
||||
return false;
|
||||
|
||||
m_lastDList = RSP.DList;
|
||||
|
|
Loading…
Reference in New Issue
Block a user