mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-04 10:03:36 +00:00
Add special frame buffer flag for Ogre Battle backgrounds.
It should protect such buffers from being overwritten by FrameBufferToRDRAM::CopyToRDRAM.
This commit is contained in:
parent
2f83ab8963
commit
e9b406d134
|
@ -390,7 +390,7 @@ void FrameBufferList::saveBuffer(u32 _address, u16 _format, u16 _size, u16 _widt
|
||||||
|
|
||||||
m_pCurrent->m_cleared = false;
|
m_pCurrent->m_cleared = false;
|
||||||
m_pCurrent->m_isDepthBuffer = _address == gDP.depthImageAddress;
|
m_pCurrent->m_isDepthBuffer = _address == gDP.depthImageAddress;
|
||||||
m_pCurrent->m_isPauseScreen = false;
|
m_pCurrent->m_isPauseScreen = m_pCurrent->m_isOBScreen = false;
|
||||||
|
|
||||||
gSP.changed |= CHANGED_TEXTURE;
|
gSP.changed |= CHANGED_TEXTURE;
|
||||||
}
|
}
|
||||||
|
@ -743,7 +743,7 @@ void FrameBufferToRDRAM::CopyToRDRAM(u32 _address) {
|
||||||
if (VI.width == 0) // H width is zero. Don't copy
|
if (VI.width == 0) // H width is zero. Don't copy
|
||||||
return;
|
return;
|
||||||
FrameBuffer *pBuffer = frameBufferList().findBuffer(_address);
|
FrameBuffer *pBuffer = frameBufferList().findBuffer(_address);
|
||||||
if (pBuffer == NULL || pBuffer->m_width < VI.width)
|
if (pBuffer == NULL || pBuffer->m_width < VI.width || pBuffer->m_isOBScreen)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
_address = pBuffer->m_startAddress;
|
_address = pBuffer->m_startAddress;
|
||||||
|
|
|
@ -25,6 +25,7 @@ struct FrameBuffer
|
||||||
bool m_cfb;
|
bool m_cfb;
|
||||||
bool m_isDepthBuffer;
|
bool m_isDepthBuffer;
|
||||||
bool m_isPauseScreen;
|
bool m_isPauseScreen;
|
||||||
|
bool m_isOBScreen;
|
||||||
bool m_needHeightCorrection;
|
bool m_needHeightCorrection;
|
||||||
|
|
||||||
GLuint m_FBO;
|
GLuint m_FBO;
|
||||||
|
|
3
gSP.cpp
3
gSP.cpp
|
@ -2105,6 +2105,9 @@ void _drawYUVImageToFrameBuffer(const ObjCoordinates & _objCoords)
|
||||||
}
|
}
|
||||||
dst += ci_width - 16;
|
dst += ci_width - 16;
|
||||||
}
|
}
|
||||||
|
FrameBuffer *pBuffer = frameBufferList().getCurrent();
|
||||||
|
if (pBuffer != NULL)
|
||||||
|
pBuffer->m_isOBScreen = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void gSPObjRectangle(u32 sp)
|
void gSPObjRectangle(u32 sp)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user