mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-07 03:13:49 +00:00
Do not remove auxilary color buffers on interlaced mode switch.
Fixed removal of color buffers with pokemon portraits in Pokemon Stadium 2.
This commit is contained in:
parent
ea3e81540b
commit
4e7a5a6b9e
|
@ -422,6 +422,18 @@ void FrameBufferList::removeBuffer(u32 _address )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FrameBufferList::removeBuffers(u32 _width, u32 _height)
|
||||||
|
{
|
||||||
|
m_pCurrent = NULL;
|
||||||
|
for (FrameBuffers::iterator iter = m_list.begin(); iter != m_list.end(); ++iter) {
|
||||||
|
while (iter->m_width == _width && iter->m_height == _height) {
|
||||||
|
iter = m_list.erase(iter);
|
||||||
|
if (iter == m_list.end())
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void FrameBufferList::attachDepthBuffer()
|
void FrameBufferList::attachDepthBuffer()
|
||||||
{
|
{
|
||||||
if (m_pCurrent == NULL)
|
if (m_pCurrent == NULL)
|
||||||
|
|
|
@ -50,6 +50,7 @@ public:
|
||||||
void destroy();
|
void destroy();
|
||||||
void saveBuffer(u32 _address, u16 _format, u16 _size, u16 _width, u16 _height, bool _cfb);
|
void saveBuffer(u32 _address, u16 _format, u16 _size, u16 _width, u16 _height, bool _cfb);
|
||||||
void removeBuffer(u32 _address);
|
void removeBuffer(u32 _address);
|
||||||
|
void removeBuffers(u32 _width, u32 _height);
|
||||||
void attachDepthBuffer();
|
void attachDepthBuffer();
|
||||||
FrameBuffer * findBuffer(u32 _startAddress);
|
FrameBuffer * findBuffer(u32 _startAddress);
|
||||||
FrameBuffer * findTmpBuffer(u32 _address);
|
FrameBuffer * findTmpBuffer(u32 _address);
|
||||||
|
|
4
VI.cpp
4
VI.cpp
|
@ -67,10 +67,10 @@ void VI_UpdateSize()
|
||||||
// const int divot = ((*REG.VI_STATUS) >> 4) & 1;
|
// const int divot = ((*REG.VI_STATUS) >> 4) & 1;
|
||||||
|
|
||||||
if (config.frameBufferEmulation.enable && (interlacedPrev != VI.interlaced || widthPrev != VI.width || heightPrev != VI.height)) {
|
if (config.frameBufferEmulation.enable && (interlacedPrev != VI.interlaced || widthPrev != VI.width || heightPrev != VI.height)) {
|
||||||
frameBufferList().destroy();
|
frameBufferList().removeBuffers(widthPrev, heightPrev);
|
||||||
|
frameBufferList().removeBuffers(VI.width, VI.height);
|
||||||
depthBufferList().destroy();
|
depthBufferList().destroy();
|
||||||
depthBufferList().init();
|
depthBufferList().init();
|
||||||
frameBufferList().init();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
VI.rwidth = VI.width != 0 ? 1.0f / VI.width : 0.0f;
|
VI.rwidth = VI.width != 0 ? 1.0f / VI.width : 0.0f;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user