1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-02 09:03:37 +00:00

Make VI height zero if vStart >= vEnd.

This commit is contained in:
Sergey Lipskiy 2014-12-26 14:31:24 +06:00
parent 626fdf8f2f
commit 5b8986874a

2
VI.cpp
View File

@ -47,7 +47,7 @@ void VI_UpdateSize()
else
VI.real_height = (u32)floor(((vEnd - vStart) >> 1) * yScale + 0.5f);
#else
VI.real_height = (((vEnd - vStart) >> 1) * vScale) >> 10;
VI.real_height = vEnd > vStart ? (((vEnd - vStart) >> 1) * vScale) >> 10 : 0;
if (VI.interlaced) {
if (VI.width != 0)
VI.real_height *= *REG.VI_WIDTH / VI.width;