C64 - refactor UserPort and nested class to not use SyncObject
This commit is contained in:
parent
e626086b05
commit
99d2db0cdc
|
@ -334,7 +334,9 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64
|
||||||
ser.EndSection();
|
ser.EndSection();
|
||||||
}
|
}
|
||||||
|
|
||||||
ser.BeginSection("User"); SaveState.SyncObject(ser, User); ser.EndSection();
|
ser.BeginSection("User");
|
||||||
|
User.SyncState(ser);
|
||||||
|
ser.EndSection();
|
||||||
|
|
||||||
if (DiskDrive != null) // TODO: a disk object is already in a nested class, is it the same reference? do we need this?
|
if (DiskDrive != null) // TODO: a disk object is already in a nested class, is it the same reference? do we need this?
|
||||||
{
|
{
|
||||||
|
|
|
@ -69,7 +69,8 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64.User
|
||||||
|
|
||||||
public void SyncState(Serializer ser)
|
public void SyncState(Serializer ser)
|
||||||
{
|
{
|
||||||
SaveState.SyncObject(ser, this);
|
ser.Sync("_connected", ref _connected);
|
||||||
|
_device?.SyncState(ser);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,9 +41,6 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64.User
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SyncState(Serializer ser)
|
public abstract void SyncState(Serializer ser);
|
||||||
{
|
|
||||||
SaveState.SyncObject(ser, this);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue