mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-04 10:03:36 +00:00
Correct VI image cut calculations, see VI fixes #1981
This commit is contained in:
parent
864e635ca4
commit
132b06fd2f
|
@ -1424,11 +1424,11 @@ void FrameBufferList::renderBuffer()
|
|||
|
||||
const f32 srcScaleY = pFilteredBuffer->m_scale;
|
||||
CachedTexture * pBufferTexture = pFilteredBuffer->m_pTexture;
|
||||
const s32 cutleft = static_cast<s32>(rdpRes.vi_minhpass * viScaleX);
|
||||
const s32 cutright = static_cast<s32>(rdpRes.vi_maxhpass * viScaleX);
|
||||
s32 srcCoord[4] = { (s32)((XoffsetLeft + cutleft) * srcScaleX),
|
||||
const s32 cutleft = static_cast<s32>(rdpRes.vi_minhpass * viScaleX * srcScaleX);
|
||||
const s32 cutright = static_cast<s32>(rdpRes.vi_maxhpass * viScaleX * srcScaleX);
|
||||
s32 srcCoord[4] = { (s32)((XoffsetLeft) * srcScaleX) + cutleft,
|
||||
(s32)(srcY0*srcScaleY),
|
||||
(s32)((srcWidth + XoffsetLeft - XoffsetRight - cutright) * srcScaleX),
|
||||
(s32)((srcWidth + XoffsetLeft - XoffsetRight) * srcScaleX) - cutright,
|
||||
min((s32)(srcY1*srcScaleY), (s32)pBufferTexture->realHeight) };
|
||||
if (srcCoord[2] > pBufferTexture->realWidth || srcCoord[3] > pBufferTexture->realHeight) {
|
||||
removeBuffer(pBuffer->m_startAddress);
|
||||
|
|
Loading…
Reference in New Issue
Block a user