Another small change to the re0 fix.

Someone proposed this change and it looks as if it may work.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3219 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
death2droid 2009-05-13 21:23:18 +00:00
parent e1699988a6
commit b71ad0f018
1 changed files with 12 additions and 6 deletions

View File

@ -348,19 +348,25 @@ void CUCode_AX::MixAdd(short* _pBuffer, int _iSize)
for (int j = 0; j < numupd; j++)
{
const u16 updpar = Memory_Read_U16(updaddr + j);
const u16 upddata = Memory_Read_U16(updaddr + j + 2);
int k = 0;
if(g_Config.m_EnableRE0Fix)
{
const u16 updpar = Memory_Read_U16(updaddr);
const u16 upddata = Memory_Read_U16(updaddr + 2);
k=j;
}
else
{
// Do nothing for now
k=0;
}
const u16 updpar = Memory_Read_U16(updaddr + k);
const u16 upddata = Memory_Read_U16(updaddr + k + 2);
// some safety checks, I hope it's enough
if(updaddr > 0x80000000 && updaddr < 0x817fffff
&& updpar < 63 && updpar > 3 && upddata >= 0 // updpar > 3 because we don't want to change