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:
Ac_K 2019-07-14 21:04:38 +02:00 committed by gdkchan
parent 4926f6523d
commit 4ad3936afd
147 changed files with 1413 additions and 1477 deletions

View file

@ -15,7 +15,7 @@ namespace Ryujinx.HLE.HOS.Services.Spl
[Command(0)]
// GetRandomBytes() -> buffer<unknown, 6>
public long GetRandomBytes(ServiceCtx context)
public ResultCode GetRandomBytes(ServiceCtx context)
{
byte[] randomBytes = new byte[context.Request.ReceiveBuff[0].Size];
@ -23,7 +23,7 @@ namespace Ryujinx.HLE.HOS.Services.Spl
context.Memory.WriteBytes(context.Request.ReceiveBuff[0].Position, randomBytes);
return 0;
return ResultCode.Success;
}
public void Dispose()