2013-11-04 01:39:19 +00:00
|
|
|
|
namespace BizHawk.Emulation.Common
|
|
|
|
|
{
|
2016-03-02 02:10:09 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// This service provides the ability to pass video output to the client
|
2016-12-13 21:56:20 +00:00
|
|
|
|
/// If available the client will display video output to the user,
|
|
|
|
|
/// If unavailable the client will fall back to a default video implementation, presumably
|
|
|
|
|
/// a black screen of some arbitrary size
|
2016-03-02 02:10:09 +00:00
|
|
|
|
/// </summary>
|
2015-01-14 22:58:14 +00:00
|
|
|
|
public interface IVideoProvider : IEmulatorService
|
2013-11-04 01:39:19 +00:00
|
|
|
|
{
|
2016-12-13 21:56:20 +00:00
|
|
|
|
/// <summary>
|
2017-04-19 14:41:26 +00:00
|
|
|
|
/// Returns a frame buffer of the current video content
|
2016-12-13 21:56:20 +00:00
|
|
|
|
/// </summary>
|
2013-11-04 01:39:19 +00:00
|
|
|
|
int[] GetVideoBuffer();
|
|
|
|
|
|
2014-04-30 23:48:37 +00:00
|
|
|
|
// put together, these describe a metric on the screen
|
|
|
|
|
// they should define the smallest size that the buffer can be placed inside such that:
|
|
|
|
|
// 1. no actual pixel data is lost
|
|
|
|
|
// 2. aspect ratio is accurate
|
2017-04-19 14:41:26 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets a value that together with <seealso cref="VirtualHeight"/>, describes a metric on the screen
|
|
|
|
|
/// they should define the smallest size that the buffer can be placed inside such that:
|
|
|
|
|
/// 1. no actual pixel data is lost
|
|
|
|
|
/// 2. aspect ratio is accurate
|
|
|
|
|
/// </summary>
|
2014-04-30 23:48:37 +00:00
|
|
|
|
int VirtualWidth { get; }
|
2017-04-19 14:41:26 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets a value that together with <seealso cref="VirtualWidth"/>, describes a metric on the screen
|
|
|
|
|
/// they should define the smallest size that the buffer can be placed inside such that:
|
|
|
|
|
/// 1. no actual pixel data is lost
|
|
|
|
|
/// 2. aspect ratio is accurate
|
|
|
|
|
/// </summary>
|
2014-04-30 23:48:37 +00:00
|
|
|
|
int VirtualHeight { get; }
|
2013-11-04 01:39:19 +00:00
|
|
|
|
|
2016-12-13 21:56:20 +00:00
|
|
|
|
/// <summary>
|
2017-04-19 14:41:26 +00:00
|
|
|
|
/// Gets the width of the frame buffer
|
2016-12-13 21:56:20 +00:00
|
|
|
|
/// </summary>
|
2013-11-04 01:39:19 +00:00
|
|
|
|
int BufferWidth { get; }
|
2016-12-13 21:56:20 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
2017-04-19 14:41:26 +00:00
|
|
|
|
/// Gets the height of the frame buffer
|
2016-12-13 21:56:20 +00:00
|
|
|
|
/// </summary>
|
2013-11-04 01:39:19 +00:00
|
|
|
|
int BufferHeight { get; }
|
2016-12-13 21:56:20 +00:00
|
|
|
|
|
2017-05-05 16:21:37 +00:00
|
|
|
|
/// <summary>
|
2017-05-05 16:25:38 +00:00
|
|
|
|
/// Gets the vsync Numerator. Combined with the <seealso cref="VsyncDenominator"/> can be used to calculate a precise vsync rate.
|
2017-05-05 16:21:37 +00:00
|
|
|
|
/// </summary>
|
2017-05-05 16:25:38 +00:00
|
|
|
|
int VsyncNumerator { get; }
|
2017-05-05 16:21:37 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
2017-05-05 16:25:38 +00:00
|
|
|
|
/// Gets the vsync Denominator. Combined with the <seealso cref="VsyncNumerator"/> can be used to calculate a precise vsync rate.
|
2017-05-05 16:21:37 +00:00
|
|
|
|
/// </summary>
|
2017-05-05 16:25:38 +00:00
|
|
|
|
int VsyncDenominator { get; }
|
2017-05-05 16:21:37 +00:00
|
|
|
|
|
2016-12-13 21:56:20 +00:00
|
|
|
|
/// <summary>
|
2017-04-19 14:41:26 +00:00
|
|
|
|
/// Gets the default color when no other color is applied
|
2016-12-13 21:56:20 +00:00
|
|
|
|
/// Often cores will set this to something other than black
|
|
|
|
|
/// to show that the core is in fact loaded and frames are rendering
|
|
|
|
|
/// which is less obvious if it is the same as the default video output
|
|
|
|
|
/// </summary>
|
2013-11-04 01:39:19 +00:00
|
|
|
|
int BackgroundColor { get; }
|
|
|
|
|
}
|
|
|
|
|
}
|