mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-04 10:03:36 +00:00
Correct VI.height calculation.
In case of interlaced mode both half-fields are used and thus all half-lines must be taken into account.
This commit is contained in:
parent
467cc44185
commit
1711da98ae
7
VI.cpp
7
VI.cpp
|
@ -22,9 +22,10 @@ void VI_UpdateSize()
|
|||
u32 hEnd = _SHIFTR( *REG.VI_H_START, 0, 10 );
|
||||
u32 hStart = _SHIFTR( *REG.VI_H_START, 16, 10 );
|
||||
|
||||
// These are in half-lines, so shift an extra bit
|
||||
u32 vEnd = _SHIFTR( *REG.VI_V_START, 1, 9 );
|
||||
u32 vStart = _SHIFTR( *REG.VI_V_START, 17, 9 );
|
||||
// Shift an extra bit if not in interlaced mode
|
||||
u32 extraShift = (*REG.VI_STATUS & 0x40) == 0x40 ? 0 : 1;
|
||||
u32 vEnd = _SHIFTR( *REG.VI_V_START, 0 + extraShift, 10 - extraShift );
|
||||
u32 vStart = _SHIFTR( *REG.VI_V_START, 16 + extraShift, 10 - extraShift );
|
||||
|
||||
VI.width = (hEnd - hStart) * xScale;
|
||||
VI.real_height = (vEnd - vStart) * yScale;
|
||||
|
|
Loading…
Reference in New Issue
Block a user