mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-03-18 19:30:50 +00:00
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)
39 lines
1.2 KiB
C#
39 lines
1.2 KiB
C#
using Ryujinx.HLE.HOS.Services.Account.Acc.AsyncContext;
|
|
|
|
namespace Ryujinx.HLE.HOS.Services.Account.Acc
|
|
{
|
|
partial class IAsyncNetworkServiceLicenseKindContext : IAsyncContext
|
|
{
|
|
private readonly NetworkServiceLicenseKind? _serviceLicenseKind;
|
|
|
|
public IAsyncNetworkServiceLicenseKindContext(AsyncExecution asyncExecution, NetworkServiceLicenseKind? serviceLicenseKind) : base(asyncExecution)
|
|
{
|
|
_serviceLicenseKind = serviceLicenseKind;
|
|
}
|
|
|
|
[CommandCmif(100)]
|
|
// GetNetworkServiceLicenseKind() -> nn::account::NetworkServiceLicenseKind
|
|
public ResultCode GetNetworkServiceLicenseKind(ServiceCtx context)
|
|
{
|
|
if (!AsyncExecution.IsInitialized)
|
|
{
|
|
return ResultCode.AsyncExecutionNotInitialized;
|
|
}
|
|
|
|
if (!AsyncExecution.SystemEvent.ReadableEvent.IsSignaled())
|
|
{
|
|
return ResultCode.Unknown41;
|
|
}
|
|
|
|
if (!_serviceLicenseKind.HasValue)
|
|
{
|
|
return ResultCode.MissingNetworkServiceLicenseKind;
|
|
}
|
|
|
|
context.ResponseData.Write((uint)_serviceLicenseKind.Value);
|
|
|
|
return ResultCode.Success;
|
|
}
|
|
}
|
|
}
|