Files
ryujinx/src/Ryujinx.HLE/HOS/Services/Ns/IReadOnlyApplicationControlDataInterface.cs
Aaron Robinson c76f65904d Enable full trimming
Enables full trimming for Ryujinx, and in doing so removes many usages of reflection, namely:

IUserService no longer uses reflection to find possible service types, and now has a generated switch based on name

Ryujinx.HLE.HOS.Tamper no longer uses dynamic to do operations, now using INumber<T> and friends

Cmif and Tipc commands in Ryujinx.HLE.HOS.Services no longer get resolved via reflection and are now done via generated virtual methods

Fix things broken by trimming (profile panel, DiscordRPC)
2026-03-18 14:50:17 -05:00

29 lines
995 B
C#

using LibHac.Common;
using LibHac.Ns;
namespace Ryujinx.HLE.HOS.Services.Ns
{
partial class IReadOnlyApplicationControlDataInterface : IpcService
{
public IReadOnlyApplicationControlDataInterface(ServiceCtx context) { }
[CommandCmif(0)]
// GetApplicationControlData(u8, u64) -> (unknown<4>, buffer<unknown, 6>)
public ResultCode GetApplicationControlData(ServiceCtx context)
{
#pragma warning disable IDE0059 // Remove unnecessary value assignment
byte source = (byte)context.RequestData.ReadInt64();
ulong titleId = context.RequestData.ReadUInt64();
#pragma warning restore IDE0059
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;
}
}
}