diff options
Diffstat (limited to 'Ryujinx.HLE/HOS/Services/Ns/IReadOnlyApplicationControlDataInterface.cs')
| -rw-r--r-- | Ryujinx.HLE/HOS/Services/Ns/IReadOnlyApplicationControlDataInterface.cs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Ns/IReadOnlyApplicationControlDataInterface.cs b/Ryujinx.HLE/HOS/Services/Ns/IReadOnlyApplicationControlDataInterface.cs new file mode 100644 index 00000000..a7f20bc7 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Ns/IReadOnlyApplicationControlDataInterface.cs @@ -0,0 +1,23 @@ +namespace Ryujinx.HLE.HOS.Services.Ns +{ + class IReadOnlyApplicationControlDataInterface : IpcService + { + public IReadOnlyApplicationControlDataInterface(ServiceCtx context) { } + + [Command(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(); + + long position = context.Request.ReceiveBuff[0].Position; + + byte[] nacpData = context.Device.System.ControlData.ByteSpan.ToArray(); + + context.Memory.WriteBytes(position, nacpData); + + return ResultCode.Success; + } + } +} |
