Refactor Disk.cs to not use SyncObject, still uses SyncDelta however

This commit is contained in:
adelikat 2017-05-13 11:42:39 -05:00
parent 99d2db0cdc
commit ec07983f92
2 changed files with 4 additions and 3 deletions

View File

@ -1,6 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using BizHawk.Common;
namespace BizHawk.Emulation.Cores.Computers.Commodore64.Media
@ -162,6 +162,8 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64.Media
public void SyncState(Serializer ser)
{
ser.Sync("WriteProtected", ref WriteProtected);
if (ser.IsReader)
{
var mediaState = new int[_originalMedia.Length];
@ -173,7 +175,6 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64.Media
var mediaState = SerializeTracks(_tracks);
SaveState.SyncDelta("MediaState", ser, _originalMedia, ref mediaState);
}
SaveState.SyncObject(ser, this);
}
}
}

View File

@ -80,7 +80,7 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64.Serial
public override void SyncState(Serializer ser)
{
ser.BeginSection("Disk");
_disk.SyncState(ser); // TODO
_disk.SyncState(ser);
ser.EndSection();
ser.Sync("BitHistory", ref _bitHistory);