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

Fix buffer end address calculation in FrameBuffer::reinit.

Fixed regression in Pokemon Stadium 2: the bottom of the portraits is cut off, see #415
This commit is contained in:
Sergey Lipskiy 2015-09-25 12:21:20 +06:00
parent 43d387b956
commit 1fb78594c8

View File

@ -229,7 +229,7 @@ void FrameBuffer::init(u32 _address, u32 _endAddress, u16 _format, u16 _size, u1
void FrameBuffer::reinit(u16 _height)
{
const u16 format = m_pTexture->format;
const u32 endAddress = m_startAddress + ((m_width * (_height - 1)) << m_size >> 1) - 1;
const u32 endAddress = m_startAddress + ((m_width * _height) << m_size >> 1) - 1;
if (m_pTexture != NULL)
textureCache().removeFrameBufferTexture(m_pTexture);
if (m_resolveFBO != 0)