aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/HOS/Services/Vi/IHOSBinderDriver.cs
diff options
context:
space:
mode:
authorAc_K <Acoustik666@gmail.com>2019-07-14 21:04:38 +0200
committergdkchan <gab.dark.100@gmail.com>2019-07-14 16:04:38 -0300
commit4ad3936afd4ca393a05b330e3848958e9598e910 (patch)
treee0b3bc963230d3ea3d6cc57b5bc6caeba9233479 /Ryujinx.HLE/HOS/Services/Vi/IHOSBinderDriver.cs
parent4926f6523d3130879e108403979ab68f1212f544 (diff)
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
Diffstat (limited to 'Ryujinx.HLE/HOS/Services/Vi/IHOSBinderDriver.cs')
-rw-r--r--Ryujinx.HLE/HOS/Services/Vi/IHOSBinderDriver.cs16
1 files changed, 8 insertions, 8 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Vi/IHOSBinderDriver.cs b/Ryujinx.HLE/HOS/Services/Vi/IHOSBinderDriver.cs
index 5583326f..4da0e2ff 100644
--- a/Ryujinx.HLE/HOS/Services/Vi/IHOSBinderDriver.cs
+++ b/Ryujinx.HLE/HOS/Services/Vi/IHOSBinderDriver.cs
@@ -24,7 +24,7 @@ namespace Ryujinx.HLE.HOS.Services.Vi
[Command(0)]
// TransactParcel(s32, u32, u32, buffer<unknown, 5, 0>) -> buffer<unknown, 6, 0>
- public long TransactParcel(ServiceCtx context)
+ public ResultCode TransactParcel(ServiceCtx context)
{
int id = context.RequestData.ReadInt32();
int code = context.RequestData.ReadInt32();
@@ -36,23 +36,23 @@ namespace Ryujinx.HLE.HOS.Services.Vi
data = Parcel.GetParcelData(data);
- return _flinger.ProcessParcelRequest(context, data, code);
+ return (ResultCode)_flinger.ProcessParcelRequest(context, data, code);
}
[Command(1)]
// AdjustRefcount(s32, s32, s32)
- public long AdjustRefcount(ServiceCtx context)
+ public ResultCode AdjustRefcount(ServiceCtx context)
{
int id = context.RequestData.ReadInt32();
int addVal = context.RequestData.ReadInt32();
int type = context.RequestData.ReadInt32();
- return 0;
+ return ResultCode.Success;
}
[Command(2)]
// GetNativeHandle(s32, s32) -> handle<copy>
- public long GetNativeHandle(ServiceCtx context)
+ public ResultCode GetNativeHandle(ServiceCtx context)
{
int id = context.RequestData.ReadInt32();
uint unk = context.RequestData.ReadUInt32();
@@ -64,12 +64,12 @@ namespace Ryujinx.HLE.HOS.Services.Vi
context.Response.HandleDesc = IpcHandleDesc.MakeMove(handle);
- return 0;
+ return ResultCode.Success;
}
[Command(3)] // 3.0.0+
// TransactParcelAuto(s32, u32, u32, buffer<unknown, 21, 0>) -> buffer<unknown, 22, 0>
- public long TransactParcelAuto(ServiceCtx context)
+ public ResultCode TransactParcelAuto(ServiceCtx context)
{
int id = context.RequestData.ReadInt32();
int code = context.RequestData.ReadInt32();
@@ -80,7 +80,7 @@ namespace Ryujinx.HLE.HOS.Services.Vi
data = Parcel.GetParcelData(data);
- return _flinger.ProcessParcelRequest(context, data, code);
+ return (ResultCode)_flinger.ProcessParcelRequest(context, data, code);
}
public void Dispose()