Removed [CoreConstructor("ZXSpectrum")] identifier (as this was causing an exception when loading roms for other systems

This commit is contained in:
Asnivor 2018-03-12 18:17:06 +00:00
parent baa46f3c99
commit 33aa77d8e3
4 changed files with 13 additions and 3 deletions

View File

@ -32,7 +32,8 @@ namespace BizHawk.Emulation.Common
new SystemInfo { SystemId = "C64", FullName = "Commodore 64" }, new SystemInfo { SystemId = "C64", FullName = "Commodore 64" },
new SystemInfo { SystemId = "AppleII", FullName = "Apple II" }, new SystemInfo { SystemId = "AppleII", FullName = "Apple II" },
new SystemInfo { SystemId = "INTV", FullName = "Intellivision" } new SystemInfo { SystemId = "INTV", FullName = "Intellivision" },
new SystemInfo { SystemId = "ZXSpectrum", FullName = "Sinclair ZX Spectrum" }
}; };
public SystemInfo this[string systemId] public SystemInfo this[string systemId]

View File

@ -41,7 +41,16 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
} }
} }
public int Frame => _machine.FrameCount; public int Frame
{
get
{
if (_machine == null)
return 0;
else
return _machine.FrameCount;
}
}
public string SystemId => "ZXSpectrum"; public string SystemId => "ZXSpectrum";

View File

@ -18,7 +18,6 @@ namespace BizHawk.Emulation.Cores.Computers.SinclairSpectrum
[ServiceNotApplicable(typeof(IDriveLight))] [ServiceNotApplicable(typeof(IDriveLight))]
public partial class ZXSpectrum : IDebuggable, IInputPollable, IStatable, IRegionable public partial class ZXSpectrum : IDebuggable, IInputPollable, IStatable, IRegionable
{ {
[CoreConstructor("ZXSpectrum")]
public ZXSpectrum(CoreComm comm, IEnumerable<byte[]> files, List<GameInfo> game, object settings, object syncSettings) public ZXSpectrum(CoreComm comm, IEnumerable<byte[]> files, List<GameInfo> game, object settings, object syncSettings)
{ {
var ser = new BasicServiceProvider(this); var ser = new BasicServiceProvider(this);

View File

@ -42,6 +42,7 @@ namespace BizHawk.Emulation.Cores
WS, WSC, NGC, WS, WSC, NGC,
C64, C64,
ZXSpectrum,
INT, INT,
A26, A52, A78, LNX, A26, A52, A78, LNX,