diff --git a/src/BizHawk.Client.Common/DisplayManager/SimpleGDIPDisplayManager.cs b/src/BizHawk.Client.Common/DisplayManager/SimpleGDIPDisplayManager.cs new file mode 100644 index 0000000000..d569e5c974 --- /dev/null +++ b/src/BizHawk.Client.Common/DisplayManager/SimpleGDIPDisplayManager.cs @@ -0,0 +1,45 @@ +#nullable enable + +using System; +using System.Drawing; + +using BizHawk.Bizware.Graphics; +using BizHawk.Emulation.Common; + +namespace BizHawk.Client.Common +{ + public sealed class SimpleGDIPDisplayManager : DisplayManagerBase + { + private SimpleGDIPDisplayManager(Config config, IEmulator emuCore, IGL_GDIPlus glImpl) + : base( + config, + emuCore, + inputManager: null, + movieSession: null, + EDispMethod.GdiPlus, + glImpl, + new GDIPlusGuiRenderer(glImpl)) + {} + + public SimpleGDIPDisplayManager(Config config, IEmulator emuCore, Func<(int Width, int Height)> getVirtualSize) + : this(config, emuCore, new IGL_GDIPlus()) {} + + protected override void ActivateGraphicsControlContext() {} + + public override void ActivateOpenGLContext() {} + + protected override int GetGraphicsControlDpi() + => DisplayManagerBase.DEFAULT_DPI; + + protected override Size GetGraphicsControlSize() + => throw new NotImplementedException(); + + public override Size GetPanelNativeSize() + => throw new NotImplementedException(); + + protected override Point GraphicsControlPointToClient(Point p) + => throw new NotImplementedException(); + + protected override void SwapBuffersOfGraphicsControl() {} + } +} diff --git a/src/BizHawk.Tests.Testroms.GB/DummyFrontend.cs b/src/BizHawk.Tests.Testroms.GB/DummyFrontend.cs index 6b3182b68b..8cf92f2d37 100644 --- a/src/BizHawk.Tests.Testroms.GB/DummyFrontend.cs +++ b/src/BizHawk.Tests.Testroms.GB/DummyFrontend.cs @@ -78,41 +78,6 @@ namespace BizHawk.Tests.Testroms.GB => throw new NotImplementedException(); // only used by Encore } - public sealed class SimpleGDIPDisplayManager : DisplayManagerBase - { - private SimpleGDIPDisplayManager(Config config, IEmulator emuCore, IGL_GDIPlus glImpl) - : base( - config, - emuCore, - inputManager: null, - movieSession: null, - EDispMethod.GdiPlus, - glImpl, - new GDIPlusGuiRenderer(glImpl)) - {} - - public SimpleGDIPDisplayManager(Config config, IEmulator emuCore, Func<(int Width, int Height)> getVirtualSize) - : this(config, emuCore, new IGL_GDIPlus()) {} - - protected override void ActivateGraphicsControlContext() {} - - public override void ActivateOpenGLContext() {} - - protected override int GetGraphicsControlDpi() - => DisplayManagerBase.DEFAULT_DPI; - - protected override Size GetGraphicsControlSize() - => throw new NotImplementedException(); - - public override Size GetPanelNativeSize() - => throw new NotImplementedException(); - - protected override Point GraphicsControlPointToClient(Point p) - => throw new NotImplementedException(); - - protected override void SwapBuffersOfGraphicsControl() {} - } - private static int _totalFrames = 0; private static readonly object _totalFramesMutex = new();