mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-07 03:13:49 +00:00
Correct max_height in ColorBufferToRDRAM::_copy
This commit is contained in:
parent
cb1f6e78e3
commit
291500c312
|
@ -239,7 +239,7 @@ u32 ColorBufferToRDRAM::_RGBAtoRGBA32(u32 _c) {
|
||||||
void ColorBufferToRDRAM::_copy(u32 _startAddress, u32 _endAddress, bool _sync)
|
void ColorBufferToRDRAM::_copy(u32 _startAddress, u32 _endAddress, bool _sync)
|
||||||
{
|
{
|
||||||
const u32 stride = m_pCurFrameBuffer->m_width << m_pCurFrameBuffer->m_size >> 1;
|
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);
|
u32 numPixels = (_endAddress - _startAddress) >> (m_pCurFrameBuffer->m_size - 1);
|
||||||
if (numPixels / m_pCurFrameBuffer->m_width > max_height) {
|
if (numPixels / m_pCurFrameBuffer->m_width > max_height) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user