Remove remaining `IGL_SlimDX9` type resolutions in cctors

This commit is contained in:
YoshiRulz 2022-04-23 14:24:11 +10:00
parent 8563be60ba
commit de1d8f56db
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
2 changed files with 5 additions and 12 deletions

View File

@ -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;

View File

@ -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
}
}