From 993960f9ead1156c2e23d701b1d9df09bb428d5d Mon Sep 17 00:00:00 2001 From: Sergey Lipskiy Date: Wed, 22 May 2019 20:16:10 +0700 Subject: [PATCH] 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. --- src/BufferCopy/ColorBufferToRDRAM.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/BufferCopy/ColorBufferToRDRAM.cpp b/src/BufferCopy/ColorBufferToRDRAM.cpp index 24ea514e..3bd637e6 100644 --- a/src/BufferCopy/ColorBufferToRDRAM.cpp +++ b/src/BufferCopy/ColorBufferToRDRAM.cpp @@ -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); }