Add events to shared memory, make it work better with direct memory

This commit is contained in:
gdkchan 2018-02-17 18:36:08 -03:00
parent 161193e113
commit ebddc40550
7 changed files with 116 additions and 31 deletions

View file

@ -15,6 +15,8 @@ namespace Ryujinx
internal Horizon Os { get; private set; }
internal VirtualFs VFs { get; private set; }
public event EventHandler Finish;
public Switch(IGalRenderer Renderer)
{
Ram = Marshal.AllocHGlobal((IntPtr)AMemoryMgr.RamSize);
@ -24,15 +26,14 @@ namespace Ryujinx
VFs = new VirtualFs();
}
public event EventHandler Finish;
internal virtual void OnFinish(EventArgs e)
{
EventHandler Handler = Finish;
if (Handler != null)
if (Finish != null)
{
Handler(this, e);
Finish(this, e);
}
}
public void Dispose()
{
Dispose(true);