since Global.AutofireNullControlls was only being used by Mainform, move it there instead of having in Globals

This commit is contained in:
adelikat 2017-05-19 14:17:25 -05:00
parent adff0d707c
commit c8d6ef0628
3 changed files with 8 additions and 8 deletions

View File

@ -28,8 +28,6 @@ namespace BizHawk.Client.Common
/// </summary>
public static int SoundMaxBufferDeficitMs;
public static AutofireController AutofireNullControls;
// the movie will be spliced inbetween these if it is present
public static readonly CopyControllerAdapter MovieInputSourceAdapter = new CopyControllerAdapter();
public static readonly CopyControllerAdapter MovieOutputHardpoint = new CopyControllerAdapter();

View File

@ -290,7 +290,7 @@ namespace BizHawk.Client.EmuHawk
CoreFileProvider.SyncCoreCommInputSignals(comm);
Emulator = new NullEmulator(comm, Global.Config.GetCoreSettings<NullEmulator>());
Global.ActiveController = new Controller(NullController.Instance.Definition);
Global.AutoFireController = Global.AutofireNullControls;
Global.AutoFireController = AutofireNullControls;
Global.AutofireStickyXORAdapter.SetOnOffPatternFromConfig();
try { GlobalWin.Sound = new Sound(Handle); }
catch
@ -1359,6 +1359,8 @@ namespace BizHawk.Client.EmuHawk
private IVideoWriter _currAviWriter;
private HashSet<int> _currAviWriterFrameList;
private AutofireController AutofireNullControls;
// Sound refator TODO: we can enforce async mode here with a property that gets/sets this but does an async check
private ISoundProvider _aviSoundInputAsync; // Note: This sound provider must be in async mode!
@ -1779,7 +1781,7 @@ namespace BizHawk.Client.EmuHawk
}
Global.ClientControls = controls;
Global.AutofireNullControls = new AutofireController(NullController.Instance.Definition, Emulator);
AutofireNullControls = new AutofireController(NullController.Instance.Definition, Emulator);
}
@ -3710,7 +3712,7 @@ namespace BizHawk.Client.EmuHawk
CoreFileProvider.SyncCoreCommInputSignals(coreComm);
Emulator = new NullEmulator(coreComm, Global.Config.GetCoreSettings<NullEmulator>());
Global.ActiveController = new Controller(NullController.Instance.Definition);
Global.AutoFireController = Global.AutofireNullControls;
Global.AutoFireController = AutofireNullControls;
RewireSound();
RebootStatusBarIcon.Visible = false;
GameIsClosing = false;

View File

@ -86,7 +86,7 @@ namespace BizHawk.Client.MultiHawk
//CoreFileProvider.SyncCoreCommInputSignals();
Global.ActiveController = new Controller(NullController.Instance.Definition);
Global.AutoFireController = Global.AutofireNullControls;
Global.AutoFireController = AutofireNullControls;
Global.AutofireStickyXORAdapter.SetOnOffPatternFromConfig();
Closing += (o, e) =>
@ -149,7 +149,7 @@ namespace BizHawk.Client.MultiHawk
}
public EmulatorWindowList EmulatorWindows = new EmulatorWindowList();
private AutofireController AutofireNullControls;
private bool _exit;
protected override void OnClosed(EventArgs e)
@ -199,7 +199,7 @@ namespace BizHawk.Client.MultiHawk
}
Global.ClientControls = controls;
Global.AutofireNullControls = new AutofireController(NullController.Instance.Definition, Emulator);
AutofireNullControls = new AutofireController(NullController.Instance.Definition, Emulator);
}
private void OpenRomMenuItem_Click(object sender, EventArgs e)