diff --git a/src/BufferCopy/ColorBufferToRDRAM.cpp b/src/BufferCopy/ColorBufferToRDRAM.cpp index 5fec8d0a..56f104de 100644 --- a/src/BufferCopy/ColorBufferToRDRAM.cpp +++ b/src/BufferCopy/ColorBufferToRDRAM.cpp @@ -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) {