Move `DispMethodEnum` to `Bizware.BizwareGL`
This commit is contained in:
parent
00d19aa550
commit
6ea714ac31
src
BizHawk.Bizware.BizwareGL
BizHawk.Bizware.DirectX
BizHawk.Bizware.OpenTK3
BizHawk.Client.Common/config
BizHawk.Client.EmuHawk
|
@ -0,0 +1,9 @@
|
|||
namespace BizHawk.Bizware.BizwareGL
|
||||
{
|
||||
public enum EDispMethod
|
||||
{
|
||||
OpenGL = 0,
|
||||
GdiPlus = 1,
|
||||
SlimDX9 = 2,
|
||||
}
|
||||
}
|
|
@ -14,6 +14,9 @@ namespace BizHawk.Bizware.BizwareGL
|
|||
/// </summary>
|
||||
public interface IGL : IDisposable
|
||||
{
|
||||
/// <remarks>HACK</remarks>
|
||||
EDispMethod DispMethodEnum { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Clears the specified buffer parts
|
||||
/// </summary>
|
||||
|
|
|
@ -10,6 +10,8 @@ namespace BizHawk.Bizware.BizwareGL
|
|||
{
|
||||
public class IGL_GdiPlus : IGL
|
||||
{
|
||||
public EDispMethod DispMethodEnum => EDispMethod.GdiPlus;
|
||||
|
||||
// rendering state
|
||||
private RenderTarget _currRenderTarget;
|
||||
|
||||
|
|
|
@ -20,6 +20,8 @@ namespace BizHawk.Bizware.DirectX
|
|||
{
|
||||
public sealed class IGL_SlimDX9 : IGL
|
||||
{
|
||||
public EDispMethod DispMethodEnum => EDispMethod.SlimDX9;
|
||||
|
||||
private const int D3DERR_DEVICELOST = -2005530520;
|
||||
private const int D3DERR_DEVICENOTRESET = -2005530519;
|
||||
|
||||
|
|
|
@ -41,6 +41,8 @@ namespace BizHawk.Bizware.OpenTK3
|
|||
/// </summary>
|
||||
public class IGL_TK : IGL
|
||||
{
|
||||
public EDispMethod DispMethodEnum => EDispMethod.OpenGL;
|
||||
|
||||
//rendering state
|
||||
private Pipeline _currPipeline;
|
||||
private RenderTarget _currRenderTarget;
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
||||
using BizHawk.Bizware.BizwareGL;
|
||||
using BizHawk.Common;
|
||||
using BizHawk.Common.PathExtensions;
|
||||
using BizHawk.Emulation.Common;
|
||||
|
|
|
@ -7,11 +7,6 @@
|
|||
NLuaPlusKopiLua
|
||||
}
|
||||
|
||||
public enum EDispMethod
|
||||
{
|
||||
OpenGL, GdiPlus, SlimDX9
|
||||
}
|
||||
|
||||
public enum ESoundOutputMethod
|
||||
{
|
||||
DirectSound, XAudio2, OpenAL, Dummy
|
||||
|
|
|
@ -33,7 +33,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
IGL gl,
|
||||
PresentationPanel presentationPanel,
|
||||
Func<bool> getIsSecondaryThrottlingDisabled)
|
||||
: base(config, emulator, inputManager, movieSession, gl.DispMethodEnum(), gl, gl.CreateRenderer())
|
||||
: base(config, emulator, inputManager, movieSession, gl.DispMethodEnum, gl, gl.CreateRenderer())
|
||||
{
|
||||
_presentationPanel = presentationPanel;
|
||||
_getIsSecondaryThrottlingDisabled = getIsSecondaryThrottlingDisabled;
|
||||
|
|
|
@ -16,13 +16,5 @@ namespace BizHawk.Client.EmuHawk
|
|||
IGL_TK => new GuiRenderer(gl),
|
||||
_ => throw new NotSupportedException()
|
||||
};
|
||||
|
||||
public static EDispMethod DispMethodEnum(this IGL gl) => gl switch
|
||||
{
|
||||
IGL_GdiPlus => EDispMethod.GdiPlus,
|
||||
IGL_SlimDX9 => EDispMethod.SlimDX9,
|
||||
IGL_TK => EDispMethod.OpenGL,
|
||||
_ => throw new ArgumentException("unknown GL impl", nameof(gl))
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue