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-24 12:41:55 +00:00
|
|
|
|
public static NullVideo Instance { get; } = new NullVideo();
|
|
|
|
|
|
2017-05-05 14:51:00 +00:00
|
|
|
|
public static int DefaultWidth { get; } = 256;
|
|
|
|
|
public static int DefaultHeight { get; } = 192;
|
|
|
|
|
public static int DefaultBackgroundColor { get; } = 0;
|
2017-05-05 16:21:37 +00:00
|
|
|
|
public static int DefaultVsyncNum { get; } = 60;
|
|
|
|
|
public static int DefaultVsyncDen { get; } = 1;
|
2016-12-07 19:21:18 +00:00
|
|
|
|
|
2017-05-05 14:51:00 +00:00
|
|
|
|
public int VirtualWidth => DefaultWidth;
|
2016-12-07 19:21:18 +00:00
|
|
|
|
|
2017-05-05 14:51:00 +00:00
|
|
|
|
public int VirtualHeight => DefaultHeight;
|
2016-12-07 19:21:18 +00:00
|
|
|
|
|
2017-05-05 14:51:00 +00:00
|
|
|
|
public int BufferWidth => DefaultWidth;
|
2016-12-12 19:43:56 +00:00
|
|
|
|
|
2017-05-05 14:51:00 +00:00
|
|
|
|
public int BufferHeight => DefaultHeight;
|
|
|
|
|
|
|
|
|
|
public int BackgroundColor => DefaultBackgroundColor;
|
2017-05-05 16:21:37 +00:00
|
|
|
|
|
2017-05-05 16:25:38 +00:00
|
|
|
|
public int VsyncNumerator => DefaultVsyncNum;
|
2017-05-05 16:21:37 +00:00
|
|
|
|
|
2017-05-05 16:25:38 +00:00
|
|
|
|
public int VsyncDenominator => DefaultVsyncDen;
|
2016-12-07 19:21:18 +00:00
|
|
|
|
}
|
|
|
|
|
}
|