mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-02 09:03:37 +00:00
Fix RDRAMtoColorBuffer::copyFromRDRAM with FBInfo
This commit is contained in:
parent
60c092ee23
commit
4d4a2d18a2
|
@ -177,8 +177,11 @@ void RDRAMtoColorBuffer::copyFromRDRAM(u32 _address, bool _bCFB)
|
|||
if (m_pCurBuffer == nullptr) {
|
||||
if (_bCFB || (config.frameBufferEmulation.copyFromRDRAM != 0 && !FBInfo::fbInfo.isSupported()))
|
||||
m_pCurBuffer = frameBufferList().findBuffer(_address);
|
||||
} else if (m_vecAddress.empty())
|
||||
return;
|
||||
} else {
|
||||
if (m_vecAddress.empty())
|
||||
return;
|
||||
frameBufferList().setCurrent(m_pCurBuffer);
|
||||
}
|
||||
|
||||
if (m_pCurBuffer == nullptr || m_pCurBuffer->m_size < G_IM_SIZ_16b)
|
||||
return;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#include <vector>
|
||||
#include <memory>
|
||||
#include <Graphics/ObjectHandle.h>
|
||||
#include <FrameBuffer.h>
|
||||
|
||||
namespace graphics {
|
||||
class PixelWriteBuffer;
|
||||
|
@ -32,13 +33,15 @@ private:
|
|||
class Cleaner
|
||||
{
|
||||
public:
|
||||
Cleaner(RDRAMtoColorBuffer * _p) : m_p(_p) {}
|
||||
Cleaner(RDRAMtoColorBuffer * _p) : m_p(_p), m_pCureentBuffer(frameBufferList().getCurrent()) {}
|
||||
~Cleaner()
|
||||
{
|
||||
m_p->reset();
|
||||
frameBufferList().setCurrent(m_pCureentBuffer);
|
||||
}
|
||||
private:
|
||||
RDRAMtoColorBuffer * m_p;
|
||||
FrameBuffer * m_pCureentBuffer;
|
||||
};
|
||||
|
||||
FrameBuffer * m_pCurBuffer;
|
||||
|
|
|
@ -92,6 +92,7 @@ public:
|
|||
FrameBuffer * getBuffer(u32 _startAddress);
|
||||
FrameBuffer * findTmpBuffer(u32 _address);
|
||||
FrameBuffer * getCurrent() const {return m_pCurrent;}
|
||||
void setCurrent(FrameBuffer * _pCurrent) { m_pCurrent = _pCurrent; }
|
||||
void renderBuffer();
|
||||
void setBufferChanged(f32 _maxY);
|
||||
void clearBuffersChanged();
|
||||
|
|
Loading…
Reference in New Issue
Block a user