Archived
1
0
Fork 0
forked from Mirror/Ryujinx
This repository has been archived on 2024-10-11. You can view files and clone it, but cannot push or open issues or pull requests.
jinx/Ryujinx.Core/OsHle/Services/ObjHelper.cs

24 lines
670 B
C#
Raw Normal View History

using Ryujinx.Core.OsHle.Handles;
using Ryujinx.Core.OsHle.Ipc;
2018-02-04 23:08:20 +00:00
namespace Ryujinx.Core.OsHle.IpcServices
2018-02-04 23:08:20 +00:00
{
static class ObjHelper
{
public static void MakeObject(ServiceCtx Context, object Obj)
{
if (Context.Session is HDomain Dom)
{
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);
}
}
}
}