Remove remaining `IGL_SlimDX9` type resolutions in cctors
This commit is contained in:
parent
8563be60ba
commit
de1d8f56db
|
@ -56,7 +56,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
bool begun = false;
|
||||
|
||||
//this needs a begin signal to set the swap chain to the next backbuffer
|
||||
if (cr.GL is IGL_SlimDX9)
|
||||
if (cr.GL.DispMethodEnum is EDispMethod.SlimDX9)
|
||||
{
|
||||
cr.Gc.Begin();
|
||||
begun = true;
|
||||
|
|
|
@ -1,20 +1,13 @@
|
|||
using System;
|
||||
|
||||
using BizHawk.Bizware.BizwareGL;
|
||||
using BizHawk.Bizware.DirectX;
|
||||
using BizHawk.Bizware.OpenTK3;
|
||||
using BizHawk.Client.Common;
|
||||
|
||||
namespace BizHawk.Client.EmuHawk
|
||||
{
|
||||
public static class IGLExtensions
|
||||
{
|
||||
public static IGuiRenderer CreateRenderer(this IGL gl) => gl switch
|
||||
{
|
||||
IGL_GdiPlus gdipImpl => new GDIPlusGuiRenderer(gdipImpl),
|
||||
IGL_SlimDX9 => new GuiRenderer(gl),
|
||||
IGL_TK => new GuiRenderer(gl),
|
||||
_ => throw new NotSupportedException()
|
||||
};
|
||||
public static IGuiRenderer CreateRenderer(this IGL gl)
|
||||
=> gl is IGL_GdiPlus gdipImpl
|
||||
? new GDIPlusGuiRenderer(gdipImpl)
|
||||
: new GuiRenderer(gl); // This implementation doesn't seem to require any OpenGL-specific (or D3D-specific) behaviour; can it be used with IGL_GdiPlus too? If so, is GDIPlusGuiRenderer only kept around because it's faster? --yoshi
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue