BizHawk/BizHawk.Client.Common/BitmapBufferVideoProvider.cs

67 lines
1.0 KiB
C#
Raw Normal View History

2015-07-21 23:17:29 +00:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using BizHawk.Emulation.Common;
using BizHawk.Bizware.BizwareGL;
namespace BizHawk.Client.Common
{
public class BitmapBufferVideoProvider : IVideoProvider, IDisposable
{
BitmapBuffer bb;
public BitmapBufferVideoProvider(BitmapBuffer bb)
{
this.bb = bb;
}
public void Dispose()
{
if (bb != null) bb.Dispose();
bb = null;
}
public int[] GetVideoBuffer()
{
return bb.Pixels;
}
public int VirtualWidth
{
get { return bb.Width; }
}
public int VirtualHeight
{
get { return bb.Height; }
}
public int BufferWidth
{
get { return bb.Width; }
}
public int BufferHeight
{
get { return bb.Height; }
}
public int BackgroundColor
{
get { return 0; }
}
2017-05-05 16:25:38 +00:00
public int VsyncNumerator
{
get { throw new InvalidOperationException(); }
}
2017-05-05 16:25:38 +00:00
public int VsyncDenominator
{
get { throw new InvalidOperationException(); }
}
2015-07-21 23:17:29 +00:00
}
}