2016-12-07 19:21:18 +00:00
|
|
|
|
namespace BizHawk.Emulation.Common
|
|
|
|
|
{
|
2016-12-14 15:11:07 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// A default IVideoProvider that simply returns
|
2017-04-10 16:24:53 +00:00
|
|
|
|
/// a black screen at an arbitrary size
|
2016-12-14 15:11:07 +00:00
|
|
|
|
/// </summary>
|
|
|
|
|
/// <seealso cref="IVideoProvider" />
|
2016-12-07 19:21:18 +00:00
|
|
|
|
public class NullVideo : IVideoProvider
|
|
|
|
|
{
|
|
|
|
|
public int[] GetVideoBuffer()
|
|
|
|
|
{
|
|
|
|
|
return new int[BufferWidth * BufferHeight];
|
|
|
|
|
}
|
|
|
|
|
|
2017-04-10 16:24:53 +00:00
|
|
|
|
public int VirtualWidth => 256;
|
2016-12-07 19:21:18 +00:00
|
|
|
|
|
2017-04-10 16:24:53 +00:00
|
|
|
|
public int VirtualHeight => 192;
|
2016-12-07 19:21:18 +00:00
|
|
|
|
|
2017-04-10 16:24:53 +00:00
|
|
|
|
public int BufferWidth => 256;
|
2016-12-07 19:21:18 +00:00
|
|
|
|
|
2017-04-10 16:24:53 +00:00
|
|
|
|
public int BufferHeight => 192;
|
2016-12-12 19:43:56 +00:00
|
|
|
|
|
2017-04-10 16:24:53 +00:00
|
|
|
|
public int BackgroundColor => 0;
|
|
|
|
|
|
|
|
|
|
private static readonly NullVideo _nullVideo = new NullVideo();
|
|
|
|
|
|
|
|
|
|
public static NullVideo Instance => _nullVideo;
|
2016-12-07 19:21:18 +00:00
|
|
|
|
}
|
|
|
|
|
}
|