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

Do not attempt to copy image to RDRAM when copyToRDRAM option set to "Disabled".

Fixed crash when open sub-screen in Zelda MM with copyToRDRAM disabled.
This commit is contained in:
Sergey Lipskiy 2019-05-22 20:16:10 +07:00
parent cd76b93000
commit 993960f9ea

View File

@ -323,6 +323,9 @@ void ColorBufferToRDRAM::copyToRDRAM(u32 _address, bool _sync)
return;
if (!_prepareCopy(_address))
return;
if (config.frameBufferEmulation.copyToRDRAM == Config::CopyToRDRAM::ctDisable)
return;
const u32 numBytes = (m_pCurFrameBuffer->m_width*m_pCurFrameBuffer->m_height) << m_pCurFrameBuffer->m_size >> 1;
_copy(m_pCurFrameBuffer->m_startAddress, m_pCurFrameBuffer->m_startAddress + numBytes, _sync);
}