Always initialize independent instances of IController in cores to NullController
- Fixes #1168
This commit is contained in:
parent
7a21f55c43
commit
b2ed6eb737
|
@ -50,7 +50,7 @@ namespace BizHawk.Emulation.Cores.Calculators
|
|||
private readonly byte[] _rom;
|
||||
|
||||
// configuration
|
||||
private IController _controller;
|
||||
private IController _controller = NullController.Instance;
|
||||
|
||||
private byte[] _ram;
|
||||
private byte[] _vram = new byte[0x300];
|
||||
|
|
|
@ -29,7 +29,7 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64
|
|||
// ports
|
||||
public readonly CartridgePort CartPort;
|
||||
public readonly CassettePort Cassette;
|
||||
public IController Controller;
|
||||
public IController Controller = NullController.Instance;
|
||||
public readonly SerialPort Serial;
|
||||
public readonly TapeDrive TapeDrive;
|
||||
public readonly UserPort User;
|
||||
|
|
|
@ -131,7 +131,7 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
|
|||
|
||||
private readonly Z80A _cpu;
|
||||
private readonly TraceBuffer _tracer;
|
||||
public IController _controller;
|
||||
public IController _controller = NullController.Instance;
|
||||
public SpectrumBase _machine;
|
||||
|
||||
private List<GameInfo> _gameInfo;
|
||||
|
|
|
@ -18,7 +18,7 @@ namespace BizHawk.Emulation.Cores.Atari.Atari2600
|
|||
private MapperBase _mapper;
|
||||
private byte[] _ram;
|
||||
|
||||
private IController _controller;
|
||||
private IController _controller = NullController.Instance;
|
||||
private int _frame;
|
||||
private int _lastAddress;
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk
|
|||
|
||||
GetControllerState(controller);
|
||||
GetConsoleState(controller);
|
||||
|
||||
|
||||
maria.RunFrame();
|
||||
|
||||
if (_islag)
|
||||
|
|
|
@ -75,7 +75,7 @@ namespace BizHawk.Emulation.Cores.ColecoVision
|
|||
public bool temp_1_prev, temp_2_prev;
|
||||
|
||||
private int _frame;
|
||||
private IController _controller;
|
||||
private IController _controller = NullController.Instance;
|
||||
|
||||
private enum InputPortMode
|
||||
{
|
||||
|
|
|
@ -309,7 +309,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
|
|||
private int VsyncNum { get; set; }
|
||||
private int VsyncDen { get; set; }
|
||||
|
||||
private IController _controller;
|
||||
private IController _controller = NullController.Instance;
|
||||
|
||||
bool resetSignal;
|
||||
bool hardResetSignal;
|
||||
|
|
|
@ -124,7 +124,7 @@ namespace BizHawk.Emulation.Cores.PCEngine
|
|||
private VPC VPC;
|
||||
private ScsiCDBus SCSI;
|
||||
private ADPCM ADPCM;
|
||||
private IController _controller;
|
||||
private IController _controller = NullController.Instance;
|
||||
|
||||
public HuC6280PSG PSG;
|
||||
internal CDAudio CDAudio;
|
||||
|
|
|
@ -216,7 +216,7 @@ namespace BizHawk.Emulation.Cores.Sega.MasterSystem
|
|||
|
||||
private bool HasYM2413 = false;
|
||||
private bool PortDEEnabled = false;
|
||||
private IController _controller;
|
||||
private IController _controller = NullController.Instance;
|
||||
|
||||
private int _frame = 0;
|
||||
|
||||
|
|
Loading…
Reference in New Issue