Onimusha 2 fix, Trying to do a divide with an uninitialized variable = bad!

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2876 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
refraction 2010-04-20 01:39:22 +00:00
parent f01e10fc9a
commit 78f45ef832
1 changed files with 4 additions and 1 deletions

View File

@ -309,7 +309,10 @@ static __forceinline void gsHandler(const u8* pMem)
{
const u16* pMem16 = (const u16*)pMem;
VIF_LOG("TRX REG = %x_%x_%x_%x", pMem16[0], pMem16[1], pMem16[2], pMem16[3]);
vif1.GSLastTRXPOS = (pMem16[0] * pMem16[2]) / (u8)vif1.TRXPOS.BLTDIVIDE;
//Onimusha does TRXREG without BLTDIVIDE first, so we "assume" 32bit for this equasion, probably isnt important.
if(vif1.TRXPOS.BLTDIVIDE) vif1.GSLastTRXPOS = (pMem16[0] * pMem16[2]) / (u8)vif1.TRXPOS.BLTDIVIDE;
else vif1.GSLastTRXPOS = (pMem16[0] * pMem16[2]) / 4;
}
if (handler >= 0x60)