aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/HOS/Services/Account/Acc/AccountService
diff options
context:
space:
mode:
authorMary <mary@mary.zone>2022-08-30 20:52:45 +0200
committerMary-nyan <thog@protonmail.com>2022-08-31 21:33:03 +0200
commitf6a7309b1459ddd0e48c726e79783d8dc7e07e3a (patch)
tree60c9bfdee0316e1c27c6abf114acabe5b07b8dd4 /Ryujinx.HLE/HOS/Services/Account/Acc/AccountService
parent472a621589ebaccd8c5da93abce32a7f0105eaf6 (diff)
account: Implement LoadNetworkServiceLicenseKindAsync
This is needed to run Pokemon Legends Arceus 1.1.1 with guest internet enabled. The game still get stuck at loading screen.
Diffstat (limited to 'Ryujinx.HLE/HOS/Services/Account/Acc/AccountService')
-rw-r--r--Ryujinx.HLE/HOS/Services/Account/Acc/AccountService/IManagerForApplication.cs14
-rw-r--r--Ryujinx.HLE/HOS/Services/Account/Acc/AccountService/ManagerServer.cs17
2 files changed, 31 insertions, 0 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Account/Acc/AccountService/IManagerForApplication.cs b/Ryujinx.HLE/HOS/Services/Account/Acc/AccountService/IManagerForApplication.cs
index 62cf79b7..68ed3f50 100644
--- a/Ryujinx.HLE/HOS/Services/Account/Acc/AccountService/IManagerForApplication.cs
+++ b/Ryujinx.HLE/HOS/Services/Account/Acc/AccountService/IManagerForApplication.cs
@@ -57,5 +57,19 @@ namespace Ryujinx.HLE.HOS.Services.Account.Acc.AccountService
{
return _managerServer.StoreOpenContext(context);
}
+
+ [CommandHipc(170)] // 6.0.0+
+ // LoadNetworkServiceLicenseKindAsync() -> object<nn::account::detail::IAsyncNetworkServiceLicenseKindContext>
+ public ResultCode LoadNetworkServiceLicenseKindAsync(ServiceCtx context)
+ {
+ ResultCode resultCode = _managerServer.LoadNetworkServiceLicenseKindAsync(context, out IAsyncNetworkServiceLicenseKindContext asyncContext);
+
+ if (resultCode == ResultCode.Success)
+ {
+ MakeObject(context, asyncContext);
+ }
+
+ return resultCode;
+ }
}
} \ No newline at end of file
diff --git a/Ryujinx.HLE/HOS/Services/Account/Acc/AccountService/ManagerServer.cs b/Ryujinx.HLE/HOS/Services/Account/Acc/AccountService/ManagerServer.cs
index 9c406a08..d74f5ecf 100644
--- a/Ryujinx.HLE/HOS/Services/Account/Acc/AccountService/ManagerServer.cs
+++ b/Ryujinx.HLE/HOS/Services/Account/Acc/AccountService/ManagerServer.cs
@@ -166,5 +166,22 @@ namespace Ryujinx.HLE.HOS.Services.Account.Acc.AccountService
return ResultCode.Success;
}
+
+ public ResultCode LoadNetworkServiceLicenseKindAsync(ServiceCtx context, out IAsyncNetworkServiceLicenseKindContext asyncContext)
+ {
+ KEvent asyncEvent = new KEvent(context.Device.System.KernelContext);
+ AsyncExecution asyncExecution = new AsyncExecution(asyncEvent);
+
+ Logger.Stub?.PrintStub(LogClass.ServiceAcc);
+
+ // NOTE: This is an extension of the data retrieved from the id token cache.
+ asyncExecution.Initialize(1000, EnsureIdTokenCacheAsyncImpl);
+
+ asyncContext = new IAsyncNetworkServiceLicenseKindContext(asyncExecution, NetworkServiceLicenseKind.Subscribed);
+
+ // return ResultCode.NullObject if the IAsyncNetworkServiceLicenseKindContext pointer is null. Doesn't occur in our case.
+
+ return ResultCode.Success;
+ }
}
} \ No newline at end of file