ryujinx/Ryujinx.Core/OsHle/Services/ObjHelper.cs

24 lines
663 B
C#
Raw Normal View History

using Ryujinx.Core.OsHle.Handles;
using Ryujinx.Core.OsHle.Ipc;
2018-02-04 18:08:20 -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)
{
Context.Response.ResponseObjIds.Add(Dom.Add(Obj));
2018-02-04 18:08:20 -05:00
}
else
{
HSessionObj HndData = new HSessionObj(Context.Session, Obj);
int VHandle = Context.Process.HandleTable.OpenHandle(HndData);
2018-02-04 18:08:20 -05:00
Context.Response.HandleDesc = IpcHandleDesc.MakeMove(VHandle);
}
}
}
}