NESHawk: fix desync bug when using reset or power and frame precise save/loadstate

This commit is contained in:
goyuken 2014-05-26 01:29:00 +00:00
parent 4f744323cf
commit 299c27ae6e
1 changed files with 8 additions and 1 deletions

View File

@ -808,7 +808,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
void SyncState(Serializer ser)
{
int version = 3;
int version = 4;
ser.BeginSection("NES");
ser.Sync("version", ref version);
ser.Sync("Frame", ref _frame);
@ -832,7 +832,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
apu.SyncState(ser);
if (version >= 2)
{
ser.Sync("DB", ref DB);
}
if (version >= 3)
{
ser.Sync("latched4016", ref latched4016);
@ -840,6 +842,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
ControllerDeck.SyncState(ser);
ser.EndSection();
}
if (version >= 4)
{
ser.Sync("resetSignal", ref resetSignal);
ser.Sync("hardResetSignal", ref hardResetSignal);
}
ser.EndSection();
}