remove CoreComm from IEmulator, and remove it from NullEmulator

This commit is contained in:
adelikat 2020-03-15 08:54:56 -05:00
parent da95c1f56f
commit 0a33940704
3 changed files with 4 additions and 13 deletions

View File

@ -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);

View File

@ -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()
{
}

View File

@ -61,11 +61,5 @@ namespace BizHawk.Emulation.Common
/// Resets the Frame and Lag counters, and any other similar counters a core might implement
/// </summary>
void ResetCounters();
/// <summary>
/// Gets the core communications module in use by this core.
/// </summary>
/// <seealso cref="BizHawk.Emulation.Common.CoreComm" />
CoreComm CoreComm { get; }
}
}