1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-02 09:03:37 +00:00

Fix replay in Mario Golf:

replay is copied to a area, which is used for depth buffer.
Added check that found frame buffer is not depth buffer.
This commit is contained in:
Sergey Lipskiy 2015-02-19 18:50:02 +06:00
parent 0efce8bb17
commit f946a82e38
4 changed files with 5 additions and 1 deletions

View File

@ -261,6 +261,8 @@ void DepthBufferList::saveBuffer(u32 _address)
FrameBuffer * pFrameBuffer = frameBufferList().findBuffer(_address);
if (pFrameBuffer == NULL)
pFrameBuffer = frameBufferList().getCurrent();
else
pFrameBuffer->m_isDepthBuffer = true;
if (m_pCurrent == NULL || m_pCurrent->m_address != _address)
m_pCurrent = findBuffer(_address);

View File

@ -347,6 +347,7 @@ void FrameBufferList::saveBuffer(u32 _address, u16 _format, u16 _size, u16 _widt
*(u32*)&RDRAM[m_pCurrent->m_startAddress] = m_pCurrent->m_startAddress;
m_pCurrent->m_cleared = false;
m_pCurrent->m_isDepthBuffer = false;
gSP.changed |= CHANGED_TEXTURE;
}

View File

@ -22,6 +22,7 @@ struct FrameBuffer
float m_scaleX, m_scaleY;
bool m_cleared;
bool m_cfb;
bool m_isDepthBuffer;
GLuint m_FBO;
gDPTile *m_pLoadTile;

View File

@ -512,7 +512,7 @@ bool CheckForFrameBufferTexture(u32 _address, u32 _bytes)
return false;
FrameBuffer *pBuffer = frameBufferList().findBuffer(_address);
bool bRes = pBuffer != NULL;
bool bRes = pBuffer != NULL && !pBuffer->m_isDepthBuffer;
if ((bRes)
//&& ((*(u32*)&RDRAM[pBuffer->startAddress] & 0xFFFEFFFE) == (pBuffer->startAddress & 0xFFFEFFFE)) // Does not work for Jet Force Gemini
)