From 4153df9471bbb505ba2177af6c6c424569a5a01e Mon Sep 17 00:00:00 2001 From: adelikat Date: Mon, 17 Aug 2020 11:52:09 -0500 Subject: [PATCH] simplify and remove some code in O2 constructor --- .../Consoles/Magnavox/Odyssey2/O2Hawk.cs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/O2Hawk.cs b/src/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/O2Hawk.cs index e29e841404..d318bdb5f0 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/O2Hawk.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Magnavox/Odyssey2/O2Hawk.cs @@ -44,7 +44,7 @@ namespace BizHawk.Emulation.Cores.Consoles.O2Hawk public bool is_G7400; [CoreConstructor("O2")] - public O2Hawk(CoreComm comm, GameInfo game, byte[] rom, /*string gameDbFn,*/ O2Settings settings, O2SyncSettings syncSettings) + public O2Hawk(CoreComm comm, GameInfo game, byte[] rom, O2Settings settings, O2SyncSettings syncSettings) { var ser = new BasicServiceProvider(this); @@ -59,8 +59,8 @@ namespace BizHawk.Emulation.Cores.Consoles.O2Hawk OnExecFetch = ExecFetch, }; - _settings = (O2Settings)settings ?? new O2Settings(); - _syncSettings = (O2SyncSettings)syncSettings ?? new O2SyncSettings(); + _settings = settings ?? new O2Settings(); + _syncSettings = syncSettings ?? new O2SyncSettings(); is_G7400 = _syncSettings.G7400_Enable; @@ -89,9 +89,6 @@ namespace BizHawk.Emulation.Cores.Consoles.O2Hawk ser.Register(this); ServiceProvider = ser; - _settings = (O2Settings)settings ?? new O2Settings(); - _syncSettings = (O2SyncSettings)syncSettings ?? new O2SyncSettings(); - _tracer = new TraceBuffer { Header = cpu.TraceHeader }; ser.Register(_tracer); ser.Register(new StateSerializer(SyncState));