aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/HOS/Services/Pm
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.HLE/HOS/Services/Pm')
-rw-r--r--Ryujinx.HLE/HOS/Services/Pm/IShellInterface.cs34
1 files changed, 34 insertions, 0 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Pm/IShellInterface.cs b/Ryujinx.HLE/HOS/Services/Pm/IShellInterface.cs
new file mode 100644
index 00000000..8880b334
--- /dev/null
+++ b/Ryujinx.HLE/HOS/Services/Pm/IShellInterface.cs
@@ -0,0 +1,34 @@
+using Ryujinx.HLE.HOS.Ipc;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Ryujinx.HLE.HOS.Services.Pm
+{
+ class IShellInterface : IpcService
+ {
+ private Dictionary<int, ServiceProcessRequest> _commands;
+
+ public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => _commands;
+
+ public IShellInterface()
+ {
+ _commands = new Dictionary<int, ServiceProcessRequest>
+ {
+ { 6, GetApplicationPid }
+ };
+ }
+
+ // GetApplicationPid() -> u64
+ public long GetApplicationPid(ServiceCtx context)
+ {
+ // FIXME: This is wrong but needed to make hb loader works
+ // TODO: Change this when we will have a way to process via a PM like interface.
+ long pid = context.Process.Pid;
+
+ context.ResponseData.Write(pid);
+
+ return 0;
+ }
+ }
+}