make NullEmulator return a valid ControllerDefinition

This commit is contained in:
beirich 2011-01-12 02:05:48 +00:00
parent 7597c7961b
commit d0d4d441c9
1 changed files with 3 additions and 1 deletions

View File

@ -5,6 +5,8 @@ namespace BizHawk
{
public class NullEmulator : IEmulator, IVideoProvider, ISoundProvider
{
private static readonly ControllerDefinition NullController = new ControllerDefinition { Name = "Null Controller" };
private int[] frameBuffer = new int[256 * 192];
private Random rand = new Random();
public IVideoProvider VideoProvider { get { return this; } }
@ -17,7 +19,7 @@ namespace BizHawk
frameBuffer[i] = Colors.Luminosity((byte)rand.Next());
}
public void HardReset() { }
public ControllerDefinition ControllerDefinition { get { return null; } }
public ControllerDefinition ControllerDefinition { get { return NullController; } }
public IController Controller { get; set; }
public int Frame { get; set; }
public byte[] SaveRam { get { return new byte[0]; } }