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

Correct VI.width calculation.

Fixed screen distortion in Excite Bike 64
This commit is contained in:
Sergey Lipskiy 2015-03-13 16:42:36 +06:00
parent d65cdbdefe
commit 8945e13e76

2
VI.cpp
View File

@ -47,7 +47,7 @@ void VI_UpdateSize()
if (VI.real_height % 2 == 1)
--VI.real_height;
} else if (hEnd != 0 && *REG.VI_WIDTH != 0)
VI.width = min((u32)((hEnd - hStart)*xScale), *REG.VI_WIDTH);
VI.width = min((u32)floorf((hEnd - hStart)*xScale + 0.5f), *REG.VI_WIDTH);
const bool isPAL = (*REG.VI_V_SYNC & 0x3ff) > 550;
if (isPAL && (vEnd - vStart) > 480) {