2017-05-09 12:21:38 +00:00
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
using BizHawk.Emulation.Common;
|
|
|
|
|
using BizHawk.Bizware.BizwareGL;
|
|
|
|
|
|
|
|
|
|
namespace BizHawk.Client.Common
|
|
|
|
|
{
|
|
|
|
|
public class BitmapBufferVideoProvider : IVideoProvider, IDisposable
|
|
|
|
|
{
|
|
|
|
|
private BitmapBuffer _bb;
|
|
|
|
|
|
|
|
|
|
public BitmapBufferVideoProvider(BitmapBuffer bb)
|
|
|
|
|
{
|
|
|
|
|
_bb = bb;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Dispose()
|
|
|
|
|
{
|
|
|
|
|
_bb?.Dispose();
|
|
|
|
|
_bb = null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int[] GetVideoBuffer()
|
|
|
|
|
{
|
|
|
|
|
return _bb.Pixels;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int VirtualWidth => _bb.Width;
|
|
|
|
|
|
|
|
|
|
public int VirtualHeight => _bb.Height;
|
|
|
|
|
|
|
|
|
|
public int BufferWidth => _bb.Width;
|
|
|
|
|
|
|
|
|
|
public int BufferHeight => _bb.Height;
|
|
|
|
|
|
|
|
|
|
public int BackgroundColor => 0;
|
|
|
|
|
|
2017-07-01 22:18:55 +00:00
|
|
|
|
public int VsyncNumerator => 0;
|
2017-05-05 16:21:37 +00:00
|
|
|
|
|
2017-07-01 22:18:55 +00:00
|
|
|
|
public int VsyncDenominator => 0;
|
2017-05-09 12:21:38 +00:00
|
|
|
|
}
|
|
|
|
|
}
|