diff --git a/src/BizHawk.Client.EmuHawk/GLManager.cs b/src/BizHawk.Client.EmuHawk/GLManager.cs index b02dcdff24..bcbe547002 100644 --- a/src/BizHawk.Client.EmuHawk/GLManager.cs +++ b/src/BizHawk.Client.EmuHawk/GLManager.cs @@ -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; diff --git a/src/BizHawk.Client.EmuHawk/GraphicsImplementations/IGLExtensions.cs b/src/BizHawk.Client.EmuHawk/GraphicsImplementations/IGLExtensions.cs index 91637cd714..44b8f00832 100644 --- a/src/BizHawk.Client.EmuHawk/GraphicsImplementations/IGLExtensions.cs +++ b/src/BizHawk.Client.EmuHawk/GraphicsImplementations/IGLExtensions.cs @@ -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 } }