Allow more than one process, free resources on process dispose, implement SvcExitThread
This commit is contained in:
@@ -10,21 +10,23 @@ namespace Ryujinx.Core.OsHle.IpcServices.Hid
|
||||
|
||||
public IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;
|
||||
|
||||
private HSharedMem Handle;
|
||||
private HSharedMem HidSharedMem;
|
||||
|
||||
public IAppletResource(HSharedMem Handle)
|
||||
public IAppletResource(HSharedMem HidSharedMem)
|
||||
{
|
||||
m_Commands = new Dictionary<int, ServiceProcessRequest>()
|
||||
{
|
||||
{ 0, GetSharedMemoryHandle }
|
||||
};
|
||||
|
||||
this.Handle = Handle;
|
||||
this.HidSharedMem = HidSharedMem;
|
||||
}
|
||||
|
||||
public static long GetSharedMemoryHandle(ServiceCtx Context)
|
||||
public long GetSharedMemoryHandle(ServiceCtx Context)
|
||||
{
|
||||
Context.Response.HandleDesc = IpcHandleDesc.MakeCopy(Context.Ns.Os.HidHandle);
|
||||
int Handle = Context.Process.HandleTable.OpenHandle(HidSharedMem);
|
||||
|
||||
Context.Response.HandleDesc = IpcHandleDesc.MakeCopy(Handle);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user