From ad18694c3d9e3af426527c9761380f9d773c178a Mon Sep 17 00:00:00 2001 From: adelikat Date: Thu, 27 Apr 2017 11:43:19 -0500 Subject: [PATCH] Cleanup CoreComm --- BizHawk.Emulation.Common/CoreComms.cs | 29 ++++++++++++++------------- BizHawk.sln.DotSettings | 1 + 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/BizHawk.Emulation.Common/CoreComms.cs b/BizHawk.Emulation.Common/CoreComms.cs index 84c5cb7a3c..b73d31d4c4 100644 --- a/BizHawk.Emulation.Common/CoreComms.cs +++ b/BizHawk.Emulation.Common/CoreComms.cs @@ -6,7 +6,7 @@ namespace BizHawk.Emulation.Common /// This object facilitates communications between client and core /// and is used by the IEmulator interface /// The primary use is to provide a client => core communication, such as providing client-side callbacks for a core to use - /// Any communications that can be described as purely a Core -> Client system, should be provided as an IEmulatorService instead + /// Any communications that can be described as purely a Core -> Client system, should be provided as an instead /// /// public class CoreComm @@ -17,7 +17,7 @@ namespace BizHawk.Emulation.Common Notify = notifyMessage; } - public ICoreFileProvider CoreFileProvider; + public ICoreFileProvider CoreFileProvider { get; set; } public double VsyncRate => VsyncNum / (double)VsyncDen; @@ -25,31 +25,32 @@ namespace BizHawk.Emulation.Common public int VsyncDen = 1; // a core should set these if you wish to provide rom status information yourself. otherwise it will be calculated by the frontend in a way you may not like, using RomGame-related concepts. - public string RomStatusAnnotation; - public string RomStatusDetails; + public string RomStatusAnnotation { get; set; } + public string RomStatusDetails { get; set; } - public int ScreenLogicalOffsetX, ScreenLogicalOffsetY; + public int ScreenLogicalOffsetX { get; set; } + public int ScreenLogicalOffsetY { get; set; } // size hint to a/v out resizer. this probably belongs in VideoProvider? but it's somewhat different than VirtualWidth... - public int NominalWidth = 640; - public int NominalHeight = 480; + public int NominalWidth { get; set; } = 640; + public int NominalHeight { get; set; } = 480; // I know we want to get rid of CoreComm, but while it's still here, I'll use it for this - public string LaunchLibretroCore; + public string LaunchLibretroCore { get; set; } /// - /// show a message. reasonably annoying (dialog box), shouldn't be used most of the time + /// Gets a message to show. reasonably annoying (dialog box), shouldn't be used most of the time /// public Action ShowMessage { get; private set; } /// - /// show a message. less annoying (OSD message). Should be used for ignorable helpful messages + /// Gets a message to show. less annoying (OSD message). Should be used for ignorable helpful messages /// public Action Notify { get; private set; } - public Func RequestGLContext; - public Action ReleaseGLContext; - public Action ActivateGLContext; - public Action DeactivateGLContext; // this shouldnt be necessary.. frontend should be changing context before it does anything.. but for now.. + public Func RequestGLContext { get; set; } + public Action ReleaseGLContext { get; set; } + public Action ActivateGLContext { get; set; } + public Action DeactivateGLContext { get; set; } // this shouldnt be necessary.. frontend should be changing context before it does anything.. but for now.. } } diff --git a/BizHawk.sln.DotSettings b/BizHawk.sln.DotSettings index 27fcc51753..b1adb191be 100644 --- a/BizHawk.sln.DotSettings +++ b/BizHawk.sln.DotSettings @@ -34,6 +34,7 @@ GBA GBC GG + GL II IO IPS