mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-04 10:03:36 +00:00
Replace _SHIFTR( *REG.VI_H_START, 0, 10 ) == 0 check by VI.width == 0 one
Fixed glError in Knockout Kings 2000. The game sets h_start==h_end at start, thus VI.width is zero but *REG.VI_H_START is not.
This commit is contained in:
parent
75bf4004cb
commit
f637e91f22
|
@ -172,7 +172,7 @@ FrameBuffer * FrameBufferList::findTmpBuffer(u32 _address)
|
|||
|
||||
void FrameBufferList::saveBuffer(u32 _address, u16 _format, u16 _size, u16 _width, u16 _height, bool _cfb)
|
||||
{
|
||||
if (_SHIFTR(*REG.VI_H_START, 0, 10) == 0) // H width is zero. Don't save
|
||||
if (VI.width == 0) // H width is zero. Don't save
|
||||
return;
|
||||
OGLVideo & ogl = video();
|
||||
m_drawBuffer = GL_FRAMEBUFFER;
|
||||
|
@ -332,7 +332,7 @@ void FrameBufferList::renderBuffer(u32 _address)
|
|||
{
|
||||
static u32 vStartPrev = 0;
|
||||
|
||||
if (_SHIFTR( *REG.VI_H_START, 0, 10 ) == 0) // H width is zero. Don't draw
|
||||
if (VI.width == 0) // H width is zero. Don't draw
|
||||
return;
|
||||
|
||||
FrameBuffer *pBuffer = findBuffer(_address);
|
||||
|
@ -407,7 +407,7 @@ void FrameBufferList::renderBuffer(u32 _address)
|
|||
|
||||
void FrameBufferList::renderBuffer(u32 _address)
|
||||
{
|
||||
if (_SHIFTR( *REG.VI_H_START, 0, 10 ) == 0) // H width is zero. Don't draw
|
||||
if (VI.width == 0) // H width is zero. Don't draw
|
||||
return;
|
||||
FrameBuffer *pBuffer = findBuffer(_address);
|
||||
if (pBuffer == NULL)
|
||||
|
@ -556,7 +556,7 @@ void FrameBufferToRDRAM::Destroy() {
|
|||
}
|
||||
|
||||
void FrameBufferToRDRAM::CopyToRDRAM( u32 address, bool bSync ) {
|
||||
if (_SHIFTR(*REG.VI_H_START, 0, 10) == 0) // H width is zero. Don't copy
|
||||
if (VI.width == 0) // H width is zero. Don't copy
|
||||
return;
|
||||
FrameBuffer *pBuffer = frameBufferList().findBuffer(address);
|
||||
if (pBuffer == NULL)
|
||||
|
@ -696,7 +696,7 @@ void DepthBufferToRDRAM::Destroy() {
|
|||
}
|
||||
|
||||
void DepthBufferToRDRAM::CopyToRDRAM( u32 address) {
|
||||
if (_SHIFTR(*REG.VI_H_START, 0, 10) == 0) // H width is zero. Don't copy
|
||||
if (VI.width == 0) // H width is zero. Don't copy
|
||||
return;
|
||||
FrameBuffer *pBuffer = frameBufferList().findBuffer(address);
|
||||
if (pBuffer == NULL || pBuffer->m_pDepthBuffer == NULL)
|
||||
|
|
2
VI.cpp
2
VI.cpp
|
@ -93,7 +93,7 @@ void VI_UpdateScreen()
|
|||
VI_UpdateSize();
|
||||
ogl.updateScale();
|
||||
const u32 size = *REG.VI_STATUS & 3;
|
||||
if (VI.height > 0 && size > G_IM_SIZ_8b && _SHIFTR( *REG.VI_H_START, 0, 10 ) > 0)
|
||||
if (VI.height > 0 && size > G_IM_SIZ_8b && VI.width > 0)
|
||||
frameBufferList().saveBuffer(*REG.VI_ORIGIN, G_IM_FMT_RGBA, size, VI.width, VI.height, true);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user