Fixed saving/loading states in OGL plugin.

Turns out the BPReload function is written plain wrong. Also, most chances are that the state will load correctly when not reloading the BP (not now though).

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1247 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
XTra.KrazzY
2008-11-22 20:06:20 +00:00
parent 0a47860bcf
commit 159e3f5b49
4 changed files with 16 additions and 12 deletions

View File

@ -811,20 +811,23 @@ void LoadBPReg(u32 value0)
BPWritten(opcode, changes, newval);
}
// Never called? Should probably be called when loading a saved state.
// Needs testing though.
// Called when loading a saved state.
// Needs more testing though.
void BPReload()
{
for (int i = 0; i < 254; i++)
{
switch (i) {
case 0x65:
case 0x41:
case 0x45: //GXSetDrawDone
case 0x52:
case 0x65:
case 0x67: // set gp metric?
case BPMEM_PE_TOKEN_ID:
case BPMEM_PE_TOKEN_INT_ID:
case 0x67: // set gp metric?
case 0x52:
break;
// Cases in which we DON'T want to reload the BP
continue;
default:
BPWritten(i, 0xFFFFFF, ((u32*)&bpmem)[i]);
}