aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.HLE/HOS/Services/Ns/IReadOnlyApplicationControlDataInterface.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Ryujinx.HLE/HOS/Services/Ns/IReadOnlyApplicationControlDataInterface.cs')
-rw-r--r--src/Ryujinx.HLE/HOS/Services/Ns/IReadOnlyApplicationControlDataInterface.cs26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/Ryujinx.HLE/HOS/Services/Ns/IReadOnlyApplicationControlDataInterface.cs b/src/Ryujinx.HLE/HOS/Services/Ns/IReadOnlyApplicationControlDataInterface.cs
new file mode 100644
index 00000000..aa37a1e7
--- /dev/null
+++ b/src/Ryujinx.HLE/HOS/Services/Ns/IReadOnlyApplicationControlDataInterface.cs
@@ -0,0 +1,26 @@
+using LibHac.Common;
+using LibHac.Ns;
+
+namespace Ryujinx.HLE.HOS.Services.Ns
+{
+ class IReadOnlyApplicationControlDataInterface : IpcService
+ {
+ public IReadOnlyApplicationControlDataInterface(ServiceCtx context) { }
+
+ [CommandCmif(0)]
+ // GetApplicationControlData(u8, u64) -> (unknown<4>, buffer<unknown, 6>)
+ public ResultCode GetApplicationControlData(ServiceCtx context)
+ {
+ byte source = (byte)context.RequestData.ReadInt64();
+ ulong titleId = context.RequestData.ReadUInt64();
+
+ ulong position = context.Request.ReceiveBuff[0].Position;
+
+ ApplicationControlProperty nacp = context.Device.Processes.ActiveApplication.ApplicationControlProperties;
+
+ context.Memory.Write(position, SpanHelpers.AsByteSpan(ref nacp).ToArray());
+
+ return ResultCode.Success;
+ }
+ }
+}