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

Correct condition for buffers removal in VI_UpdateSize() :

remove buffers when interlace mode changed or when main buffer width changed.
This commit is contained in:
Sergey Lipskiy 2015-03-21 14:18:55 +06:00
parent ff890e3bc8
commit 61e6eb268c

8
VI.cpp
View File

@ -66,9 +66,11 @@ void VI_UpdateSize()
// const int fsaa = ((*REG.VI_STATUS) >> 8) & 3;
// const int divot = ((*REG.VI_STATUS) >> 4) & 1;
if (config.frameBufferEmulation.enable && (interlacedPrev != VI.interlaced)) {
frameBufferList().removeBuffers(widthPrev);
frameBufferList().removeBuffers(VI.width);
FrameBufferList & fbList = frameBufferList();
FrameBuffer * pBuffer = fbList.findBuffer(VI.lastOrigin);
if (config.frameBufferEmulation.enable && ((interlacedPrev != VI.interlaced) || (pBuffer != NULL && pBuffer->m_width != VI.width))) {
fbList.removeBuffers(widthPrev);
fbList.removeBuffers(VI.width);
depthBufferList().destroy();
depthBufferList().init();
}