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

Fix color image height detection for height = 1.

This commit is contained in:
Sergey Lipskiy 2014-10-17 11:51:09 +07:00
parent 3a27056759
commit 7835cfb180
2 changed files with 3 additions and 9 deletions

View File

@ -176,9 +176,9 @@ void FrameBufferList::saveBuffer(u32 _address, u16 _format, u16 _size, u16 _widt
return;
OGLVideo & ogl = video();
m_drawBuffer = GL_FRAMEBUFFER;
if (m_pCurrent != NULL && gDP.colorImage.height > 1) {
if (m_pCurrent != NULL && gDP.colorImage.height > 0) {
m_pCurrent->m_endAddress = min(RDRAMSize, m_pCurrent->m_startAddress + (((m_pCurrent->m_width * gDP.colorImage.height) << m_pCurrent->m_size >> 1) - 1));
if (!config.frameBufferEmulation.copyToRDRAM && !m_pCurrent->m_cfb && !m_pCurrent->m_cleared)
if (!config.frameBufferEmulation.copyToRDRAM && !m_pCurrent->m_cfb && !m_pCurrent->m_cleared && gDP.colorImage.height > 1)
gDPFillRDRAM(m_pCurrent->m_startAddress, 0, 0, m_pCurrent->m_width, gDP.colorImage.height, m_pCurrent->m_width, m_pCurrent->m_size, m_pCurrent->m_fillcolor);
}

View File

@ -276,17 +276,11 @@ void gDPSetColorImage( u32 format, u32 size, u32 width, u32 address )
{
//if (gDP.colorImage.changed)
frameBufferList().saveBuffer(address, (u16)format, (u16)size, (u16)width, height, false);
gDP.colorImage.height = 1;
gDP.colorImage.height = 0;
//OGL_ClearDepthBuffer();
} else
gDP.colorImage.height = height;
// if (width == VI.width)
// gDP.colorImage.height = VI.height;
// else
// gDP.colorImage.height = 1;
}
gDP.colorImage.format = format;