Compare commits

...

2 Commits

Author SHA1 Message Date
IverCoder
57fc996337 Fix inconsistent capitalization (#4070) 2022-12-08 09:32:24 +00:00
Ac_K
1f3b860f06 acc: Stub CheckNetworkServiceAvailabilityAsync (#4052) 2022-12-07 23:19:22 +01:00
3 changed files with 41 additions and 1 deletions

View File

@@ -315,7 +315,7 @@
"DialogUpdaterConvertFailedMessage": "Failed to convert the current Ryujinx version.",
"DialogUpdaterCancelUpdateMessage": "Cancelling Update!",
"DialogUpdaterAlreadyOnLatestVersionMessage": "You are already using the most updated version of Ryujinx!",
"DialogUpdaterFailedToGetVersionMessage": "An error has occurred when trying to get release information from Github Release. This can be caused if a new release is being compiled by GitHub Actions. Try again in a few minutes.",
"DialogUpdaterFailedToGetVersionMessage": "An error has occurred when trying to get release information from GitHub Release. This can be caused if a new release is being compiled by GitHub Actions. Try again in a few minutes.",
"DialogUpdaterConvertFailedGithubMessage": "Failed to convert the received Ryujinx version from Github Release.",
"DialogUpdaterDownloadingMessage": "Downloading Update...",
"DialogUpdaterExtractionMessage": "Extracting Update...",

View File

@@ -1,8 +1,12 @@
using Ryujinx.Common;
using Ryujinx.Common.Logging;
using Ryujinx.Cpu;
using Ryujinx.HLE.HOS.Kernel.Threading;
using Ryujinx.HLE.HOS.Services.Account.Acc.AccountService;
using Ryujinx.HLE.HOS.Services.Account.Acc.AsyncContext;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
namespace Ryujinx.HLE.HOS.Services.Account.Acc
{
@@ -142,6 +146,28 @@ namespace Ryujinx.HLE.HOS.Services.Account.Acc
return ResultCode.Success;
}
public ResultCode CheckNetworkServiceAvailabilityAsync(ServiceCtx context, out IAsyncContext asyncContext)
{
KEvent asyncEvent = new(context.Device.System.KernelContext);
AsyncExecution asyncExecution = new(asyncEvent);
asyncExecution.Initialize(1000, CheckNetworkServiceAvailabilityAsyncImpl);
asyncContext = new IAsyncContext(asyncExecution);
// return ResultCode.NullObject if the IAsyncContext pointer is null. Doesn't occur in our case.
return ResultCode.Success;
}
private async Task CheckNetworkServiceAvailabilityAsyncImpl(CancellationToken token)
{
Logger.Stub?.PrintStub(LogClass.ServiceAcc);
// TODO: Use a real function instead, with the CancellationToken.
await Task.CompletedTask;
}
public ResultCode StoreSaveDataThumbnail(ServiceCtx context)
{
ResultCode resultCode = CheckUserId(context, out UserId _);

View File

@@ -124,6 +124,20 @@ namespace Ryujinx.HLE.HOS.Services.Account.Acc
return ResultCode.Success;
}
[CommandHipc(103)] // 4.0.0+
// CheckNetworkServiceAvailabilityAsync() -> object<nn::account::detail::IAsyncContext>
public ResultCode CheckNetworkServiceAvailabilityAsync(ServiceCtx context)
{
ResultCode resultCode = _applicationServiceServer.CheckNetworkServiceAvailabilityAsync(context, out IAsyncContext asyncContext);
if (resultCode == ResultCode.Success)
{
MakeObject(context, asyncContext);
}
return resultCode;
}
[CommandHipc(110)]
// StoreSaveDataThumbnail(nn::account::Uid, buffer<bytes, 5>)
public ResultCode StoreSaveDataThumbnail(ServiceCtx context)