diff --git a/BizHawk.Emulation.Cores/Computers/Commodore64/C64.Motherboard.cs b/BizHawk.Emulation.Cores/Computers/Commodore64/C64.Motherboard.cs index 30bd0210e8..4120c9ef9e 100644 --- a/BizHawk.Emulation.Cores/Computers/Commodore64/C64.Motherboard.cs +++ b/BizHawk.Emulation.Cores/Computers/Commodore64/C64.Motherboard.cs @@ -334,7 +334,9 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64 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? { diff --git a/BizHawk.Emulation.Cores/Computers/Commodore64/User/UserPort.cs b/BizHawk.Emulation.Cores/Computers/Commodore64/User/UserPort.cs index 1eb11afc2d..268ede9a47 100644 --- a/BizHawk.Emulation.Cores/Computers/Commodore64/User/UserPort.cs +++ b/BizHawk.Emulation.Cores/Computers/Commodore64/User/UserPort.cs @@ -69,7 +69,8 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64.User public void SyncState(Serializer ser) { - SaveState.SyncObject(ser, this); + ser.Sync("_connected", ref _connected); + _device?.SyncState(ser); } } } diff --git a/BizHawk.Emulation.Cores/Computers/Commodore64/User/UserPortDevice.cs b/BizHawk.Emulation.Cores/Computers/Commodore64/User/UserPortDevice.cs index 108e4d2674..c47b13d504 100644 --- a/BizHawk.Emulation.Cores/Computers/Commodore64/User/UserPortDevice.cs +++ b/BizHawk.Emulation.Cores/Computers/Commodore64/User/UserPortDevice.cs @@ -41,9 +41,6 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64.User return true; } - public void SyncState(Serializer ser) - { - SaveState.SyncObject(ser, this); - } + public abstract void SyncState(Serializer ser); } }