mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2024-11-15 01:25:25 +00:00
acc: Stub CheckNetworkServiceAvailabilityAsync (#4052)
This commit is contained in:
parent
abe3c02ab4
commit
1f3b860f06
|
@ -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 _);
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue