VU Int: Link in clamping settings from UI

The only settings are either None or every other option is On (basically Extra + Preserve Sign)
This commit is contained in:
refractionpcsx2 2021-09-12 15:20:50 +01:00
parent 980c954bf4
commit 52943d8399
2 changed files with 10 additions and 6 deletions

View File

@ -49,7 +49,10 @@ static __ri u32 VU_MAC_UPDATE( int shift, VURegs * VU, float f )
return s;
case 255:
VU->macflag = (VU->macflag&~(0x0101<<shift)) | (0x1000<<shift);
return s|0x7f7fffff; /* max allowed */
if (CHECK_VU_OVERFLOW)
return s | 0x7f7fffff; /* max allowed */
else
return v;
default:
VU->macflag = (VU->macflag & ~(0x1101<<shift));
return v;

View File

@ -449,18 +449,19 @@ __fi void _vuBackupVI(VURegs* VU, int reg)
#ifndef INT_VUDOUBLEHACK
static float __fastcall vuDouble(u32 f)
{
switch(f & 0x7f800000)
switch (f & 0x7f800000)
{
case 0x0:
f &= 0x80000000;
return *(float*)&f;
break;
case 0x7f800000:
{
u32 d = (f & 0x80000000)|0x7f7fffff;
return *(float*)&d;
if (CHECK_VU_OVERFLOW)
{
u32 d = (f & 0x80000000) | 0x7f7fffff;
return *(float*)&d;
}
break;
}
}
return *(float*)&f;
}