Refactoring result codes (#731)
* refactoring result codes - Add a main enum who can handle some orphalin result codes and the default `ResultCode.Success` one. - Add sub-enum by services when it's needed. - Remove some empty line. - Recast all service calls to ResultCode. - Remove some unneeded static declaration. - Delete unused `NvHelper` class. * NvResult is back * Fix
This commit is contained in:
parent
4926f6523d
commit
4ad3936afd
147 changed files with 1413 additions and 1477 deletions
|
@ -13,7 +13,7 @@ namespace Ryujinx.HLE.HOS.Services.Time
|
|||
|
||||
[Command(0)]
|
||||
// GetCurrentTimePoint() -> nn::time::SteadyClockTimePoint
|
||||
public long GetCurrentTimePoint(ServiceCtx context)
|
||||
public ResultCode GetCurrentTimePoint(ServiceCtx context)
|
||||
{
|
||||
context.ResponseData.Write((long)(System.Diagnostics.Process.GetCurrentProcess().StartTime - DateTime.Now).TotalSeconds);
|
||||
|
||||
|
@ -22,25 +22,25 @@ namespace Ryujinx.HLE.HOS.Services.Time
|
|||
context.ResponseData.Write((byte)0);
|
||||
}
|
||||
|
||||
return 0;
|
||||
return ResultCode.Success;
|
||||
}
|
||||
|
||||
[Command(1)]
|
||||
// GetTestOffset() -> nn::TimeSpanType
|
||||
public long GetTestOffset(ServiceCtx context)
|
||||
public ResultCode GetTestOffset(ServiceCtx context)
|
||||
{
|
||||
context.ResponseData.Write(_testOffset);
|
||||
|
||||
return 0;
|
||||
return ResultCode.Success;
|
||||
}
|
||||
|
||||
[Command(2)]
|
||||
// SetTestOffset(nn::TimeSpanType)
|
||||
public long SetTestOffset(ServiceCtx context)
|
||||
public ResultCode SetTestOffset(ServiceCtx context)
|
||||
{
|
||||
_testOffset = context.RequestData.ReadUInt64();
|
||||
|
||||
return 0;
|
||||
return ResultCode.Success;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue