diff --git a/BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.cs b/BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.cs index 061a6c2f15..213ba3c7d5 100644 --- a/BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.cs +++ b/BizHawk.Emulation.Cores/Consoles/PC Engine/PCEngine.cs @@ -70,7 +70,8 @@ namespace BizHawk.Emulation.Cores.PCEngine Type = NecSystemType.SuperGrafx; break; } - Init(game, rom, (PCESettings)Settings); + this.Settings = (PCESettings)Settings ?? new PCESettings(); + Init(game, rom); } public string BoardName { get { return null; } } @@ -83,12 +84,13 @@ namespace BizHawk.Emulation.Cores.PCEngine systemid = "PCECD"; Type = NecSystemType.TurboCD; this.disc = disc; - Init(game, rom, (PCESettings)Settings); + this.Settings = (PCESettings)Settings ?? new PCESettings(); + Init(game, rom); // the default RomStatusDetails don't do anything with Disc CoreComm.RomStatusDetails = string.Format("{0}\r\nDisk partial hash:{1}", game.Name, disc.GetHash()); } - void Init(GameInfo game, byte[] rom, PCESettings Settings) + void Init(GameInfo game, byte[] rom) { Controller = NullController.GetNullController(); Cpu = new HuC6280(); @@ -99,8 +101,6 @@ namespace BizHawk.Emulation.Cores.PCEngine Cpu.Logger = (s) => CoreComm.Tracer.Put(s); - this.Settings = Settings; - if (TurboGrafx) { Ram = new byte[0x2000]; @@ -628,7 +628,7 @@ namespace BizHawk.Emulation.Cores.PCEngine disc.Dispose(); } - public PCESettings Settings = new PCESettings(); + public PCESettings Settings; public object GetSettings() { return Settings.Clone(); } public object GetSyncSettings() { return null; }