1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-04 10:03:36 +00:00

Fix viewport Y for negative scale.

Fixed #1426, regression in eiko st andrews
This commit is contained in:
Sergey Lipskiy 2017-03-18 23:16:07 +07:00
parent c6feb32931
commit 7d47207d34

View File

@ -223,7 +223,7 @@ void GraphicsDrawer::_updateViewport() const
if (_needAdjustCoordinate(wnd))
Xf = _adjustViewportX(Xf);
const s32 X = (s32)(Xf * scaleX);
const s32 Y = (s32)(gSP.viewport.y * scaleY);
const s32 Y = gSP.viewport.vscale[1] < 0 ? (s32)((gSP.viewport.y + gSP.viewport.vscale[1] * 2.0f) * scaleY) : (s32)(gSP.viewport.y * scaleY);
gfxContext.setViewport(X, Y,
std::max((s32)(gSP.viewport.width * scaleX), 0), std::max((s32)(gSP.viewport.height * scaleY), 0));
}