From e85e0f4a5f4b8faaaa6a0b55694fae01b158d7b4 Mon Sep 17 00:00:00 2001 From: Sergey Lipskiy Date: Tue, 20 Apr 2021 23:32:27 +0700 Subject: [PATCH] Fix issues in ColorBufferToRDRAM::_prepareCopy: * remove an optimization: don't update current buffer if it is the same for the current frame. This optimization causes crash in Zelda OOT pause screen with "aux buffer copy" enabled. * fix width calculation for aux buffers when "aux buffer copy" enabled. --- src/BufferCopy/ColorBufferToRDRAM.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/BufferCopy/ColorBufferToRDRAM.cpp b/src/BufferCopy/ColorBufferToRDRAM.cpp index b1d1a61d..fa223620 100644 --- a/src/BufferCopy/ColorBufferToRDRAM.cpp +++ b/src/BufferCopy/ColorBufferToRDRAM.cpp @@ -57,9 +57,6 @@ bool ColorBufferToRDRAM::_prepareCopy(u32& _startAddress) if (_startAddress < pBuffer->m_startAddress) _startAddress = pBuffer->m_startAddress; - if (m_frameCount == curFrame && pBuffer == m_pCurFrameBuffer && m_startAddress != _startAddress) - return true; - const u32 numPixels = pBuffer->m_width * pBuffer->m_height; if (numPixels == 0) return false; @@ -89,7 +86,7 @@ bool ColorBufferToRDRAM::_prepareCopy(u32& _startAddress) u32 x0 = 0; u32 width; - if (config.frameBufferEmulation.nativeResFactor == 0) { + if (config.frameBufferEmulation.nativeResFactor == 0 && m_pCurFrameBuffer->m_scale != 1.0f) { const u32 screenWidth = wnd.getWidth(); width = screenWidth; if (wnd.isAdjustScreen()) {