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