From 486f3163f399fb8751939bd7e9b31d0471e841d2 Mon Sep 17 00:00:00 2001 From: Thog Date: Tue, 28 Apr 2020 03:44:29 +0200 Subject: Fix hbl 2.3.1 and hbmenu 3.3.0 (#1171) * Fix hbl 2.3.1 and hbmenu 3.3.0 * log class: Add ServicePtm * fix build issue * do not cast titleId to byte * Address Ac_K's comment --- .../Ns/IReadOnlyApplicationControlDataInterface.cs | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Ryujinx.HLE/HOS/Services/Ns/IReadOnlyApplicationControlDataInterface.cs (limited to 'Ryujinx.HLE/HOS/Services/Ns/IReadOnlyApplicationControlDataInterface.cs') 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) + 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; + } + } +} -- cgit v1.2.3