using System; namespace BizHawk.Emulation.Common { /// /// This object fascilitates 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 /// /// public class CoreComm { public CoreComm(Action showMessage, Action NotifyMessage) { ShowMessage = showMessage; Notify = NotifyMessage; } public ICoreFileProvider CoreFileProvider; public double VsyncRate { get { return VsyncNum / (double)VsyncDen; } } public int VsyncNum = 60; 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 int ScreenLogicalOffsetX, ScreenLogicalOffsetY; // 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; //I know we want to get rid of CoreComm, but while it's still here, I'll use it for this public string LaunchLibretroCore; /// /// show a message. 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 /// 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.. } }