ObjHelper.cs 666 B

123456789101112131415161718192021222324
  1. using Ryujinx.Core.OsHle.Handles;
  2. using Ryujinx.Core.OsHle.Ipc;
  3. namespace Ryujinx.Core.OsHle.Objects
  4. {
  5. static class ObjHelper
  6. {
  7. public static void MakeObject(ServiceCtx Context, object Obj)
  8. {
  9. if (Context.Session is HDomain Dom)
  10. {
  11. Context.Response.ResponseObjIds.Add(Dom.GenerateObjectId(Obj));
  12. }
  13. else
  14. {
  15. HSessionObj HndData = new HSessionObj(Context.Session, Obj);
  16. int VHandle = Context.Ns.Os.Handles.GenerateId(HndData);
  17. Context.Response.HandleDesc = IpcHandleDesc.MakeMove(VHandle);
  18. }
  19. }
  20. }
  21. }