aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Core/OsHle/Objects/ObjHelper.cs
diff options
context:
space:
mode:
authoremmauss <emmausssss@gmail.com>2018-02-20 22:09:23 +0200
committergdkchan <gab.dark.100@gmail.com>2018-02-20 17:09:23 -0300
commit62b827f474f0aa2152dd339fcc7cf31084e16a0b (patch)
tree0e5c55b341aee4db0ccb841a084f253ec5e05657 /Ryujinx.Core/OsHle/Objects/ObjHelper.cs
parentcb665bb715834526d73c9469d16114b287faaecd (diff)
Split main project into core,graphics and chocolarm4 subproject (#29)
Diffstat (limited to 'Ryujinx.Core/OsHle/Objects/ObjHelper.cs')
-rw-r--r--Ryujinx.Core/OsHle/Objects/ObjHelper.cs24
1 files changed, 24 insertions, 0 deletions
diff --git a/Ryujinx.Core/OsHle/Objects/ObjHelper.cs b/Ryujinx.Core/OsHle/Objects/ObjHelper.cs
new file mode 100644
index 00000000..a151a287
--- /dev/null
+++ b/Ryujinx.Core/OsHle/Objects/ObjHelper.cs
@@ -0,0 +1,24 @@
+using Ryujinx.Core.OsHle.Handles;
+using Ryujinx.Core.OsHle.Ipc;
+
+namespace Ryujinx.Core.OsHle.Objects
+{
+ static class ObjHelper
+ {
+ public static void MakeObject(ServiceCtx Context, object Obj)
+ {
+ if (Context.Session is HDomain Dom)
+ {
+ Context.Response.ResponseObjIds.Add(Dom.GenerateObjectId(Obj));
+ }
+ else
+ {
+ HSessionObj HndData = new HSessionObj(Context.Session, Obj);
+
+ int VHandle = Context.Ns.Os.Handles.GenerateId(HndData);
+
+ Context.Response.HandleDesc = IpcHandleDesc.MakeMove(VHandle);
+ }
+ }
+ }
+} \ No newline at end of file