2018-02-20 21:09:23 +01:00
|
|
|
using Ryujinx.Core.OsHle.Handles;
|
|
|
|
using Ryujinx.Core.OsHle.Ipc;
|
2018-02-05 00:08:20 +01:00
|
|
|
|
2018-02-25 05:34:16 +01:00
|
|
|
namespace Ryujinx.Core.OsHle.IpcServices
|
2018-02-05 00:08:20 +01:00
|
|
|
{
|
|
|
|
static class ObjHelper
|
|
|
|
{
|
|
|
|
public static void MakeObject(ServiceCtx Context, object Obj)
|
|
|
|
{
|
|
|
|
if (Context.Session is HDomain Dom)
|
|
|
|
{
|
2018-03-12 05:04:52 +01:00
|
|
|
Context.Response.ResponseObjIds.Add(Dom.Add(Obj));
|
2018-02-05 00:08:20 +01:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
HSessionObj HndData = new HSessionObj(Context.Session, Obj);
|
|
|
|
|
2018-03-12 05:04:52 +01:00
|
|
|
int VHandle = Context.Process.HandleTable.OpenHandle(HndData);
|
2018-02-05 00:08:20 +01:00
|
|
|
|
|
|
|
Context.Response.HandleDesc = IpcHandleDesc.MakeMove(VHandle);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|