1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-12-21 04:12:01 +00:00

Address gdkchan's comment

This commit is contained in:
Mary 2022-08-31 19:41:43 +02:00 committed by Mary-nyan
parent f6a7309b14
commit 730d2f4b9b
2 changed files with 12 additions and 12 deletions

View file

@ -7,18 +7,18 @@ namespace Ryujinx.HLE.HOS.Services.Account.Acc
{
class IAsyncContext : IpcService
{
protected AsyncExecution _asyncExecution;
protected AsyncExecution AsyncExecution;
public IAsyncContext(AsyncExecution asyncExecution)
{
_asyncExecution = asyncExecution;
AsyncExecution = asyncExecution;
}
[CommandHipc(0)]
// GetSystemEvent() -> handle<copy>
public ResultCode GetSystemEvent(ServiceCtx context)
{
if (context.Process.HandleTable.GenerateHandle(_asyncExecution.SystemEvent.ReadableEvent, out int _systemEventHandle) != KernelResult.Success)
if (context.Process.HandleTable.GenerateHandle(AsyncExecution.SystemEvent.ReadableEvent, out int _systemEventHandle) != KernelResult.Success)
{
throw new InvalidOperationException("Out of handles!");
}
@ -32,14 +32,14 @@ namespace Ryujinx.HLE.HOS.Services.Account.Acc
// Cancel()
public ResultCode Cancel(ServiceCtx context)
{
if (!_asyncExecution.IsInitialized)
if (!AsyncExecution.IsInitialized)
{
return ResultCode.AsyncExecutionNotInitialized;
}
if (_asyncExecution.IsRunning)
if (AsyncExecution.IsRunning)
{
_asyncExecution.Cancel();
AsyncExecution.Cancel();
}
return ResultCode.Success;
@ -49,12 +49,12 @@ namespace Ryujinx.HLE.HOS.Services.Account.Acc
// HasDone() -> b8
public ResultCode HasDone(ServiceCtx context)
{
if (!_asyncExecution.IsInitialized)
if (!AsyncExecution.IsInitialized)
{
return ResultCode.AsyncExecutionNotInitialized;
}
context.ResponseData.Write(_asyncExecution.SystemEvent.ReadableEvent.IsSignaled());
context.ResponseData.Write(AsyncExecution.SystemEvent.ReadableEvent.IsSignaled());
return ResultCode.Success;
}
@ -63,12 +63,12 @@ namespace Ryujinx.HLE.HOS.Services.Account.Acc
// GetResult()
public ResultCode GetResult(ServiceCtx context)
{
if (!_asyncExecution.IsInitialized)
if (!AsyncExecution.IsInitialized)
{
return ResultCode.AsyncExecutionNotInitialized;
}
if (!_asyncExecution.SystemEvent.ReadableEvent.IsSignaled())
if (!AsyncExecution.SystemEvent.ReadableEvent.IsSignaled())
{
return ResultCode.Unknown41;
}

View file

@ -15,12 +15,12 @@ namespace Ryujinx.HLE.HOS.Services.Account.Acc
// GetNetworkServiceLicenseKind() -> nn::account::NetworkServiceLicenseKind
public ResultCode GetNetworkServiceLicenseKind(ServiceCtx context)
{
if (!_asyncExecution.IsInitialized)
if (!AsyncExecution.IsInitialized)
{
return ResultCode.AsyncExecutionNotInitialized;
}
if (!_asyncExecution.SystemEvent.ReadableEvent.IsSignaled())
if (!AsyncExecution.SystemEvent.ReadableEvent.IsSignaled())
{
return ResultCode.Unknown41;
}