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

Limit max height for main frame buffers by VI.height

Fixed #2519 Extreme G picture is shaking / unstable
This commit is contained in:
Sergey Lipskiy 2021-11-20 17:22:24 +07:00
parent 00529a21ed
commit 94ce6203b6

View File

@ -661,7 +661,10 @@ void FrameBufferList::setBufferChanged(f32 _maxY)
gDP.colorImage.height = max(gDP.colorImage.height, static_cast<u32>(_maxY));
gDP.colorImage.height = min(gDP.colorImage.height, static_cast<u32>(gDP.scissor.lry));
if (m_pCurrent != nullptr) {
m_pCurrent->m_height = max(m_pCurrent->m_height, gDP.colorImage.height);
if (m_pCurrent->m_isMainBuffer)
m_pCurrent->m_height = max(m_pCurrent->m_height, min(gDP.colorImage.height, VI.height));
else
m_pCurrent->m_height = max(m_pCurrent->m_height, gDP.colorImage.height);
m_pCurrent->m_cfb = false;
m_pCurrent->m_changed = true;
m_pCurrent->m_copiedToRdram = false;