mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-07 03:13:49 +00:00
Fix FrameBufferToRDRAM::_prepareCopy
Wrong buffer could be used when several buffers copied per frame
This commit is contained in:
parent
0b12d3b26e
commit
148349a00a
|
@ -1045,13 +1045,14 @@ void FrameBufferToRDRAM::Destroy() {
|
||||||
bool FrameBufferToRDRAM::_prepareCopy(u32 _address)
|
bool FrameBufferToRDRAM::_prepareCopy(u32 _address)
|
||||||
{
|
{
|
||||||
const u32 curFrame = video().getBuffersSwapCount();
|
const u32 curFrame = video().getBuffersSwapCount();
|
||||||
if (m_frameCount == curFrame)
|
FrameBuffer * pBuffer = frameBufferList().findBuffer(_address);
|
||||||
|
if (m_frameCount == curFrame && pBuffer == m_pCurFrameBuffer)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (VI.width == 0 || frameBufferList().getCurrent() == NULL)
|
if (VI.width == 0 || frameBufferList().getCurrent() == NULL)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
m_pCurFrameBuffer = frameBufferList().findBuffer(_address);
|
m_pCurFrameBuffer = pBuffer;
|
||||||
if (m_pCurFrameBuffer == NULL || m_pCurFrameBuffer->m_isOBScreen)
|
if (m_pCurFrameBuffer == NULL || m_pCurFrameBuffer->m_isOBScreen)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user