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

Revert "Correct VI.real_height calculation in interlaced mode."

This change cause crash in Top Gear Overdrive menu, because hEnd == hStart
at some point.

This reverts commit 61f9389656bd26b49c43394b701a3a7e31737b3c.
This commit is contained in:
Sergey Lipskiy 2015-03-01 20:55:06 +06:00
parent 97c9fecd8c
commit c22de119e5

7
VI.cpp
View File

@ -55,11 +55,8 @@ void VI_UpdateSize()
#else
VI.real_height = vEnd > vStart ? (((vEnd - vStart) >> 1) * vScale) >> 10 : 0;
if (VI.interlaced) {
if (VI.width != 0) {
const u32 heightScale = *REG.VI_WIDTH / (u32)((hEnd - hStart)*xScale + 0.5f);
if (heightScale > 1)
VI.real_height *= heightScale;
}
if (VI.width != 0)
VI.real_height *= *REG.VI_WIDTH / VI.width;
} else {
if (*REG.VI_WIDTH > 0)
VI.width = min(VI.width, *REG.VI_WIDTH);