1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-06-30 08:24:05 +00:00

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.
This commit is contained in:
Sergey Lipskiy 2021-04-20 23:32:27 +07:00
parent fe869cf5d2
commit e85e0f4a5f

View File

@ -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()) {