1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-04 10:03:36 +00:00

Correct max_height in ColorBufferToRDRAM::_copy

This commit is contained in:
Sergey Lipskiy 2017-03-10 21:53:41 +07:00
parent cb1f6e78e3
commit 291500c312

View File

@ -239,7 +239,7 @@ u32 ColorBufferToRDRAM::_RGBAtoRGBA32(u32 _c) {
void ColorBufferToRDRAM::_copy(u32 _startAddress, u32 _endAddress, bool _sync)
{
const u32 stride = m_pCurFrameBuffer->m_width << m_pCurFrameBuffer->m_size >> 1;
const u32 max_height = std::min(480U, cutHeight(_startAddress, m_pCurFrameBuffer->m_height, stride));
const u32 max_height = std::min((u32)VI_GetMaxBufferHeight(m_pCurFrameBuffer->m_width), cutHeight(_startAddress, m_pCurFrameBuffer->m_height, stride));
u32 numPixels = (_endAddress - _startAddress) >> (m_pCurFrameBuffer->m_size - 1);
if (numPixels / m_pCurFrameBuffer->m_width > max_height) {