Remove Global.CoreComm since it was pointless
This commit is contained in:
parent
fd1621a536
commit
817c798eab
|
@ -108,13 +108,8 @@ namespace BizHawk.Client.Common
|
|||
#endregion
|
||||
|
||||
// this should go away now
|
||||
public static void SyncCoreCommInputSignals(CoreComm target = null)
|
||||
public static void SyncCoreCommInputSignals(CoreComm target)
|
||||
{
|
||||
if (target == null)
|
||||
{
|
||||
target = Global.CoreComm;
|
||||
}
|
||||
|
||||
var cfp = new CoreFileProvider(target.ShowMessage);
|
||||
target.CoreFileProvider = cfp;
|
||||
cfp.FirmwareManager = Global.FirmwareManager;
|
||||
|
|
|
@ -8,7 +8,6 @@ namespace BizHawk.Client.Common
|
|||
public static class Global
|
||||
{
|
||||
public static IEmulator Emulator;
|
||||
public static CoreComm CoreComm;
|
||||
public static Config Config;
|
||||
public static GameInfo Game;
|
||||
public static CheatCollection CheatList;
|
||||
|
|
|
@ -270,9 +270,10 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
Input.Initialize();
|
||||
InitControls();
|
||||
Global.CoreComm = CreateCoreComm();
|
||||
CoreFileProvider.SyncCoreCommInputSignals();
|
||||
Global.Emulator = new NullEmulator(Global.CoreComm, Global.Config.GetCoreSettings<NullEmulator>());
|
||||
|
||||
var comm = CreateCoreComm();
|
||||
CoreFileProvider.SyncCoreCommInputSignals(comm);
|
||||
Global.Emulator = new NullEmulator(comm, Global.Config.GetCoreSettings<NullEmulator>());
|
||||
Global.ActiveController = Global.NullControls;
|
||||
Global.AutoFireController = Global.AutofireNullControls;
|
||||
Global.AutofireStickyXORAdapter.SetOnOffPatternFromConfig();
|
||||
|
@ -3287,9 +3288,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
if (result)
|
||||
{
|
||||
Global.Emulator = loader.LoadedEmulator;
|
||||
Global.CoreComm = nextComm;
|
||||
Global.Game = loader.Game;
|
||||
CoreFileProvider.SyncCoreCommInputSignals();
|
||||
CoreFileProvider.SyncCoreCommInputSignals(nextComm);
|
||||
InputManager.SyncControls();
|
||||
|
||||
if (Global.Emulator is TI83 && Global.Config.TI83autoloadKeyPad)
|
||||
|
@ -3495,9 +3495,9 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
Global.CheatList.SaveOnClose();
|
||||
Global.Emulator.Dispose();
|
||||
Global.CoreComm = CreateCoreComm();
|
||||
CoreFileProvider.SyncCoreCommInputSignals();
|
||||
Global.Emulator = new NullEmulator(Global.CoreComm, Global.Config.GetCoreSettings<NullEmulator>());
|
||||
var coreComm = CreateCoreComm();
|
||||
CoreFileProvider.SyncCoreCommInputSignals(coreComm);
|
||||
Global.Emulator = new NullEmulator(coreComm, Global.Config.GetCoreSettings<NullEmulator>());
|
||||
Global.ActiveController = Global.NullControls;
|
||||
Global.AutoFireController = Global.AutofireNullControls;
|
||||
RewireSound();
|
||||
|
@ -3514,9 +3514,9 @@ namespace BizHawk.Client.EmuHawk
|
|||
if (GlobalWin.Tools.AskSave())
|
||||
{
|
||||
CloseGame(clearSram);
|
||||
Global.CoreComm = CreateCoreComm();
|
||||
CoreFileProvider.SyncCoreCommInputSignals();
|
||||
Global.Emulator = new NullEmulator(Global.CoreComm, Global.Config.GetCoreSettings<NullEmulator>());
|
||||
var coreComm = CreateCoreComm();
|
||||
CoreFileProvider.SyncCoreCommInputSignals(coreComm);
|
||||
Global.Emulator = new NullEmulator(coreComm, Global.Config.GetCoreSettings<NullEmulator>());
|
||||
Global.Game = GameInfo.NullInstance;
|
||||
|
||||
GlobalWin.Tools.Restart();
|
||||
|
|
|
@ -126,7 +126,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
_asyncSoundProvider = source;
|
||||
_semiSync.BaseSoundProvider = source;
|
||||
_semiSync.RecalculateMagic(Global.CoreComm.VsyncRate);
|
||||
_semiSync.RecalculateMagic(Global.Emulator.CoreComm.VsyncRate);
|
||||
}
|
||||
|
||||
public bool LogUnderruns { get; set; }
|
||||
|
|
Loading…
Reference in New Issue