Fixed a rewind buffer problem. A recent hack started the rewind buffer by saving the state after frame 0 to the start of the rewind buffer. This fix saves the state to LastState at the end of the rom load. This way the rewind buffer starts with a diff between the state after rom load and the state after frame 0.
This commit is contained in:
parent
9a1e18045e
commit
c813cd853b
|
@ -1337,6 +1337,9 @@ namespace BizHawk.MultiClient
|
||||||
StateSlots.Clear();
|
StateSlots.Clear();
|
||||||
UpdateStatusSlots();
|
UpdateStatusSlots();
|
||||||
UpdateDumpIcon();
|
UpdateDumpIcon();
|
||||||
|
|
||||||
|
LastState = Global.Emulator.SaveStateBinary();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,19 +25,6 @@ namespace BizHawk.MultiClient
|
||||||
Global.OSD.AddMessage("See 'Arcade Card Rewind Hack' in Emulation->PC Engine options.");
|
Global.OSD.AddMessage("See 'Arcade Card Rewind Hack' in Emulation->PC Engine options.");
|
||||||
}
|
}
|
||||||
|
|
||||||
var ms = new MemoryStream();
|
|
||||||
var writer = new BinaryWriter(ms);
|
|
||||||
for (int i = 0; i < LastState.Length; i++)
|
|
||||||
{
|
|
||||||
if (i == 254 || i == LastState.Length - 1)
|
|
||||||
{
|
|
||||||
writer.Write((byte)(i + 1));
|
|
||||||
writer.Write((ushort) 0);
|
|
||||||
writer.Write(LastState, 0, i + 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
RewindBuf.Push(ms);
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue