From 0a339407048aafdf898c748b97f5754c0ba1059f Mon Sep 17 00:00:00 2001 From: adelikat Date: Sun, 15 Mar 2020 08:54:56 -0500 Subject: [PATCH] remove CoreComm from IEmulator, and remove it from NullEmulator --- BizHawk.Client.EmuHawk/MainForm.cs | 6 +++--- .../Base Implementations/NullEmulator.cs | 5 +---- BizHawk.Emulation.Common/Interfaces/IEmulator.cs | 6 ------ 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/BizHawk.Client.EmuHawk/MainForm.cs b/BizHawk.Client.EmuHawk/MainForm.cs index 92820d47eb..359e9e3784 100644 --- a/BizHawk.Client.EmuHawk/MainForm.cs +++ b/BizHawk.Client.EmuHawk/MainForm.cs @@ -217,7 +217,7 @@ namespace BizHawk.Client.EmuHawk _throttle = new Throttle(); var comm = CreateCoreComm(); - Emulator = new NullEmulator(comm); + Emulator = new NullEmulator(); GlobalWin.Tools = new ToolManager(this, Config, Emulator); Global.CheatList = new CheatCollection(); CheatList.Changed += Tools.UpdateCheatRelatedTools; @@ -3884,7 +3884,7 @@ namespace BizHawk.Client.EmuHawk Emulator.Dispose(); var coreComm = CreateCoreComm(); CoreFileProvider.SyncCoreCommInputSignals(coreComm); - Emulator = new NullEmulator(coreComm); + Emulator = new NullEmulator(); ClientApi.UpdateEmulatorAndVP(Emulator); Global.ActiveController = new Controller(NullController.Instance.Definition); Global.AutoFireController = _autofireNullControls; @@ -3904,7 +3904,7 @@ namespace BizHawk.Client.EmuHawk CloseGame(clearSram); var coreComm = CreateCoreComm(); CoreFileProvider.SyncCoreCommInputSignals(coreComm); - Emulator = new NullEmulator(coreComm); + Emulator = new NullEmulator(); Global.Game = GameInfo.NullInstance; Tools.Restart(Emulator); diff --git a/BizHawk.Emulation.Common/Base Implementations/NullEmulator.cs b/BizHawk.Emulation.Common/Base Implementations/NullEmulator.cs index 2dc4e53db1..d6b6824aba 100644 --- a/BizHawk.Emulation.Common/Base Implementations/NullEmulator.cs +++ b/BizHawk.Emulation.Common/Base Implementations/NullEmulator.cs @@ -20,10 +20,9 @@ { private readonly int[] _frameBuffer = new int[NullVideo.DefaultWidth * NullVideo.DefaultHeight]; - public NullEmulator(CoreComm comm) + public NullEmulator() { ServiceProvider = new BasicServiceProvider(this); - CoreComm = comm; } #region IEmulator @@ -46,8 +45,6 @@ public string BoardName => null; - public CoreComm CoreComm { get; } - public void Dispose() { } diff --git a/BizHawk.Emulation.Common/Interfaces/IEmulator.cs b/BizHawk.Emulation.Common/Interfaces/IEmulator.cs index 1f8abe0a02..e984af324b 100644 --- a/BizHawk.Emulation.Common/Interfaces/IEmulator.cs +++ b/BizHawk.Emulation.Common/Interfaces/IEmulator.cs @@ -61,11 +61,5 @@ namespace BizHawk.Emulation.Common /// Resets the Frame and Lag counters, and any other similar counters a core might implement /// void ResetCounters(); - - /// - /// Gets the core communications module in use by this core. - /// - /// - CoreComm CoreComm { get; } } }