diff --git a/FrameBuffer.cpp b/FrameBuffer.cpp index 1d7eb4f1..bb3cfd2c 100644 --- a/FrameBuffer.cpp +++ b/FrameBuffer.cpp @@ -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) diff --git a/VI.cpp b/VI.cpp index 78f77a2f..7c48f134 100644 --- a/VI.cpp +++ b/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); } }