2018-02-20 15:09:23 -05:00
|
|
|
using Ryujinx.Core.OsHle.Handles;
|
|
|
|
using Ryujinx.Core.OsHle.Ipc;
|
2018-02-04 18:08:20 -05:00
|
|
|
|
2018-02-24 23:34:16 -05:00
|
|
|
namespace Ryujinx.Core.OsHle.IpcServices
|
2018-02-04 18:08:20 -05:00
|
|
|
{
|
|
|
|
static class ObjHelper
|
|
|
|
{
|
|
|
|
public static void MakeObject(ServiceCtx Context, object Obj)
|
|
|
|
{
|
|
|
|
if (Context.Session is HDomain Dom)
|
|
|
|
{
|
2018-02-10 13:31:40 -05:00
|
|
|
Context.Response.ResponseObjIds.Add(Dom.GenerateObjectId(Obj));
|
2018-02-04 18:08:20 -05:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
HSessionObj HndData = new HSessionObj(Context.Session, Obj);
|
|
|
|
|
|
|
|
int VHandle = Context.Ns.Os.Handles.GenerateId(HndData);
|
|
|
|
|
|
|
|
Context.Response.HandleDesc = IpcHandleDesc.MakeMove(VHandle);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|