diff options
| author | Ac_K <Acoustik666@gmail.com> | 2019-07-14 21:04:38 +0200 |
|---|---|---|
| committer | gdkchan <gab.dark.100@gmail.com> | 2019-07-14 16:04:38 -0300 |
| commit | 4ad3936afd4ca393a05b330e3848958e9598e910 (patch) | |
| tree | e0b3bc963230d3ea3d6cc57b5bc6caeba9233479 /Ryujinx.HLE/HOS/Services/Vi | |
| parent | 4926f6523d3130879e108403979ab68f1212f544 (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')
| -rw-r--r-- | Ryujinx.HLE/HOS/Services/Vi/ColorFormat.cs | 2 | ||||
| -rw-r--r-- | Ryujinx.HLE/HOS/Services/Vi/IApplicationDisplayService.cs | 65 | ||||
| -rw-r--r-- | Ryujinx.HLE/HOS/Services/Vi/IApplicationRootService.cs | 4 | ||||
| -rw-r--r-- | Ryujinx.HLE/HOS/Services/Vi/IHOSBinderDriver.cs | 16 | ||||
| -rw-r--r-- | Ryujinx.HLE/HOS/Services/Vi/IManagerDisplayService.cs | 18 | ||||
| -rw-r--r-- | Ryujinx.HLE/HOS/Services/Vi/IManagerRootService.cs | 4 | ||||
| -rw-r--r-- | Ryujinx.HLE/HOS/Services/Vi/ISystemDisplayService.cs | 14 | ||||
| -rw-r--r-- | Ryujinx.HLE/HOS/Services/Vi/ISystemRootService.cs | 4 | ||||
| -rw-r--r-- | Ryujinx.HLE/HOS/Services/Vi/NvFlinger.cs | 28 | ||||
| -rw-r--r-- | Ryujinx.HLE/HOS/Services/Vi/ResultCode.cs | 13 | ||||
| -rw-r--r-- | Ryujinx.HLE/HOS/Services/Vi/ScalingMode.cs | 2 |
11 files changed, 91 insertions, 79 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Vi/ColorFormat.cs b/Ryujinx.HLE/HOS/Services/Vi/ColorFormat.cs index 70938585..2522dffc 100644 --- a/Ryujinx.HLE/HOS/Services/Vi/ColorFormat.cs +++ b/Ryujinx.HLE/HOS/Services/Vi/ColorFormat.cs @@ -363,4 +363,4 @@ namespace Ryujinx.HLE.HOS.Services.Android X6Bayer10GBRG = ColorSpace.BayerGBRG | ColorSwizzle.Y000 | ColorComponent.Y6X10 | ColorDataType.Integer, XYZ = ColorSpace.XYZ | ColorSwizzle.XYZ1 | ColorComponent.X20Y20Z20 | ColorDataType.Float, } -} +}
\ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Vi/IApplicationDisplayService.cs b/Ryujinx.HLE/HOS/Services/Vi/IApplicationDisplayService.cs index 948309fe..2f1e68e8 100644 --- a/Ryujinx.HLE/HOS/Services/Vi/IApplicationDisplayService.cs +++ b/Ryujinx.HLE/HOS/Services/Vi/IApplicationDisplayService.cs @@ -5,7 +5,6 @@ using System; using System.IO; using System.Text; -using static Ryujinx.HLE.HOS.ErrorCode; using static Ryujinx.HLE.HOS.Services.Android.Parcel; namespace Ryujinx.HLE.HOS.Services.Vi @@ -21,47 +20,47 @@ namespace Ryujinx.HLE.HOS.Services.Vi [Command(100)] // GetRelayService() -> object<nns::hosbinder::IHOSBinderDriver> - public long GetRelayService(ServiceCtx context) + public ResultCode GetRelayService(ServiceCtx context) { MakeObject(context, new IHOSBinderDriver( context.Device.System, context.Device.Gpu.Renderer)); - return 0; + return ResultCode.Success; } [Command(101)] // GetSystemDisplayService() -> object<nn::visrv::sf::ISystemDisplayService> - public long GetSystemDisplayService(ServiceCtx context) + public ResultCode GetSystemDisplayService(ServiceCtx context) { MakeObject(context, new ISystemDisplayService(this)); - return 0; + return ResultCode.Success; } [Command(102)] // GetManagerDisplayService() -> object<nn::visrv::sf::IManagerDisplayService> - public long GetManagerDisplayService(ServiceCtx context) + public ResultCode GetManagerDisplayService(ServiceCtx context) { MakeObject(context, new IManagerDisplayService(this)); - return 0; + return ResultCode.Success; } [Command(103)] // 2.0.0+ // GetIndirectDisplayTransactionService() -> object<nns::hosbinder::IHOSBinderDriver> - public long GetIndirectDisplayTransactionService(ServiceCtx context) + public ResultCode GetIndirectDisplayTransactionService(ServiceCtx context) { MakeObject(context, new IHOSBinderDriver( context.Device.System, context.Device.Gpu.Renderer)); - return 0; + return ResultCode.Success; } [Command(1000)] // ListDisplays() -> (u64, buffer<nn::vi::DisplayInfo, 6>) - public long ListDisplays(ServiceCtx context) + public ResultCode ListDisplays(ServiceCtx context) { long recBuffPtr = context.Request.ReceiveBuff[0].Position; @@ -76,12 +75,12 @@ namespace Ryujinx.HLE.HOS.Services.Vi context.ResponseData.Write(1L); - return 0; + return ResultCode.Success; } [Command(1010)] // OpenDisplay(nn::vi::DisplayName) -> u64 - public long OpenDisplay(ServiceCtx context) + public ResultCode OpenDisplay(ServiceCtx context) { string name = GetDisplayName(context); @@ -89,35 +88,35 @@ namespace Ryujinx.HLE.HOS.Services.Vi context.ResponseData.Write(displayId); - return 0; + return ResultCode.Success; } [Command(1020)] // CloseDisplay(u64) - public long CloseDisplay(ServiceCtx context) + public ResultCode CloseDisplay(ServiceCtx context) { int displayId = context.RequestData.ReadInt32(); _displays.Delete(displayId); - return 0; + return ResultCode.Success; } [Command(1102)] // GetDisplayResolution(u64) -> (u64, u64) - public long GetDisplayResolution(ServiceCtx context) + public ResultCode GetDisplayResolution(ServiceCtx context) { long displayId = context.RequestData.ReadInt32(); context.ResponseData.Write(1280); context.ResponseData.Write(720); - return 0; + return ResultCode.Success; } [Command(2020)] // OpenLayer(nn::vi::DisplayName, u64, nn::applet::AppletResourceUserId, pid) -> (u64, buffer<bytes, 6>) - public long OpenLayer(ServiceCtx context) + public ResultCode OpenLayer(ServiceCtx context) { long layerId = context.RequestData.ReadInt64(); long userId = context.RequestData.ReadInt64(); @@ -130,21 +129,21 @@ namespace Ryujinx.HLE.HOS.Services.Vi context.ResponseData.Write((long)parcel.Length); - return 0; + return ResultCode.Success; } [Command(2021)] // CloseLayer(u64) - public long CloseLayer(ServiceCtx context) + public ResultCode CloseLayer(ServiceCtx context) { long layerId = context.RequestData.ReadInt64(); - return 0; + return ResultCode.Success; } [Command(2030)] // CreateStrayLayer(u32, u64) -> (u64, u64, buffer<bytes, 6>) - public long CreateStrayLayer(ServiceCtx context) + public ResultCode CreateStrayLayer(ServiceCtx context) { long layerFlags = context.RequestData.ReadInt64(); long displayId = context.RequestData.ReadInt64(); @@ -160,29 +159,29 @@ namespace Ryujinx.HLE.HOS.Services.Vi context.ResponseData.Write(0L); context.ResponseData.Write((long)parcel.Length); - return 0; + return ResultCode.Success; } [Command(2031)] // DestroyStrayLayer(u64) - public long DestroyStrayLayer(ServiceCtx context) + public ResultCode DestroyStrayLayer(ServiceCtx context) { - return 0; + return ResultCode.Success; } [Command(2101)] // SetLayerScalingMode(u32, u64) - public long SetLayerScalingMode(ServiceCtx context) + public ResultCode SetLayerScalingMode(ServiceCtx context) { int scalingMode = context.RequestData.ReadInt32(); long unknown = context.RequestData.ReadInt64(); - return 0; + return ResultCode.Success; } [Command(2102)] // 5.0.0+ // ConvertScalingMode(unknown) -> unknown - public long ConvertScalingMode(ServiceCtx context) + public ResultCode ConvertScalingMode(ServiceCtx context) { SrcScalingMode scalingMode = (SrcScalingMode)context.RequestData.ReadInt32(); @@ -191,19 +190,19 @@ namespace Ryujinx.HLE.HOS.Services.Vi if (!convertedScalingMode.HasValue) { // Scaling mode out of the range of valid values. - return MakeError(ErrorModule.Vi, 1); + return ResultCode.InvalidArguments; } if (scalingMode != SrcScalingMode.ScaleToWindow && scalingMode != SrcScalingMode.PreserveAspectRatio) { // Invalid scaling mode specified. - return MakeError(ErrorModule.Vi, 6); + return ResultCode.InvalidScalingMode; } context.ResponseData.Write((ulong)convertedScalingMode); - return 0; + return ResultCode.Success; } private DstScalingMode? ConvertScalingMode(SrcScalingMode source) @@ -222,7 +221,7 @@ namespace Ryujinx.HLE.HOS.Services.Vi [Command(5202)] // GetDisplayVsyncEvent(u64) -> handle<copy> - public long GetDisplayVSyncEvent(ServiceCtx context) + public ResultCode GetDisplayVSyncEvent(ServiceCtx context) { string name = GetDisplayName(context); @@ -233,7 +232,7 @@ namespace Ryujinx.HLE.HOS.Services.Vi context.Response.HandleDesc = IpcHandleDesc.MakeCopy(handle); - return 0; + return ResultCode.Success; } private byte[] MakeIGraphicsBufferProducer(long basePtr) diff --git a/Ryujinx.HLE/HOS/Services/Vi/IApplicationRootService.cs b/Ryujinx.HLE/HOS/Services/Vi/IApplicationRootService.cs index a614d877..e0f71d0f 100644 --- a/Ryujinx.HLE/HOS/Services/Vi/IApplicationRootService.cs +++ b/Ryujinx.HLE/HOS/Services/Vi/IApplicationRootService.cs @@ -7,13 +7,13 @@ namespace Ryujinx.HLE.HOS.Services.Vi [Command(0)] // GetDisplayService(u32) -> object<nn::visrv::sf::IApplicationDisplayService> - public long GetDisplayService(ServiceCtx context) + public ResultCode GetDisplayService(ServiceCtx context) { int serviceType = context.RequestData.ReadInt32(); MakeObject(context, new IApplicationDisplayService()); - return 0; + return ResultCode.Success; } } }
\ No newline at end of file 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() diff --git a/Ryujinx.HLE/HOS/Services/Vi/IManagerDisplayService.cs b/Ryujinx.HLE/HOS/Services/Vi/IManagerDisplayService.cs index ac6d49bd..3a64be15 100644 --- a/Ryujinx.HLE/HOS/Services/Vi/IManagerDisplayService.cs +++ b/Ryujinx.HLE/HOS/Services/Vi/IManagerDisplayService.cs @@ -13,27 +13,27 @@ namespace Ryujinx.HLE.HOS.Services.Vi [Command(2010)] // CreateManagedLayer(u32, u64, nn::applet::AppletResourceUserId) -> u64 - public static long CreateManagedLayer(ServiceCtx context) + public ResultCode CreateManagedLayer(ServiceCtx context) { Logger.PrintStub(LogClass.ServiceVi); context.ResponseData.Write(0L); //LayerId - return 0; + return ResultCode.Success; } [Command(2011)] // DestroyManagedLayer(u64) - public long DestroyManagedLayer(ServiceCtx context) + public ResultCode DestroyManagedLayer(ServiceCtx context) { Logger.PrintStub(LogClass.ServiceVi); - return 0; + return ResultCode.Success; } [Command(2012)] // 7.0.0+ // CreateStrayLayer(u32, u64) -> (u64, u64, buffer<bytes, 6>) - public static long CreateStrayLayer(ServiceCtx context) + public ResultCode CreateStrayLayer(ServiceCtx context) { Logger.PrintStub(LogClass.ServiceVi); @@ -42,20 +42,20 @@ namespace Ryujinx.HLE.HOS.Services.Vi [Command(6000)] // AddToLayerStack(u32, u64) - public static long AddToLayerStack(ServiceCtx context) + public ResultCode AddToLayerStack(ServiceCtx context) { Logger.PrintStub(LogClass.ServiceVi); - return 0; + return ResultCode.Success; } [Command(6002)] // SetLayerVisibility(b8, u64) - public static long SetLayerVisibility(ServiceCtx context) + public ResultCode SetLayerVisibility(ServiceCtx context) { Logger.PrintStub(LogClass.ServiceVi); - return 0; + return ResultCode.Success; } } }
\ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Vi/IManagerRootService.cs b/Ryujinx.HLE/HOS/Services/Vi/IManagerRootService.cs index 991f01c3..feaf4612 100644 --- a/Ryujinx.HLE/HOS/Services/Vi/IManagerRootService.cs +++ b/Ryujinx.HLE/HOS/Services/Vi/IManagerRootService.cs @@ -7,13 +7,13 @@ namespace Ryujinx.HLE.HOS.Services.Vi [Command(2)] // GetDisplayService(u32) -> object<nn::visrv::sf::IApplicationDisplayService> - public long GetDisplayService(ServiceCtx context) + public ResultCode GetDisplayService(ServiceCtx context) { int serviceType = context.RequestData.ReadInt32(); MakeObject(context, new IApplicationDisplayService()); - return 0; + return ResultCode.Success; } } }
\ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Vi/ISystemDisplayService.cs b/Ryujinx.HLE/HOS/Services/Vi/ISystemDisplayService.cs index 28702d6f..dc0430f6 100644 --- a/Ryujinx.HLE/HOS/Services/Vi/ISystemDisplayService.cs +++ b/Ryujinx.HLE/HOS/Services/Vi/ISystemDisplayService.cs @@ -13,25 +13,25 @@ namespace Ryujinx.HLE.HOS.Services.Vi [Command(2205)] // SetLayerZ(u64, u64) - public static long SetLayerZ(ServiceCtx context) + public ResultCode SetLayerZ(ServiceCtx context) { Logger.PrintStub(LogClass.ServiceVi); - return 0; + return ResultCode.Success; } [Command(2207)] // SetLayerVisibility(b8, u64) - public static long SetLayerVisibility(ServiceCtx context) + public ResultCode SetLayerVisibility(ServiceCtx context) { Logger.PrintStub(LogClass.ServiceVi); - return 0; + return ResultCode.Success; } [Command(2312)] // 1.0.0-6.2.0 // CreateStrayLayer(u32, u64) -> (u64, u64, buffer<bytes, 6>) - public static long CreateStrayLayer(ServiceCtx context) + public ResultCode CreateStrayLayer(ServiceCtx context) { Logger.PrintStub(LogClass.ServiceVi); @@ -40,7 +40,7 @@ namespace Ryujinx.HLE.HOS.Services.Vi [Command(3200)] // GetDisplayMode(u64) -> nn::vi::DisplayModeInfo - public static long GetDisplayMode(ServiceCtx context) + public ResultCode GetDisplayMode(ServiceCtx context) { // TODO: De-hardcode resolution. context.ResponseData.Write(1280); @@ -48,7 +48,7 @@ namespace Ryujinx.HLE.HOS.Services.Vi context.ResponseData.Write(60.0f); context.ResponseData.Write(0); - return 0; + return ResultCode.Success; } } }
\ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Vi/ISystemRootService.cs b/Ryujinx.HLE/HOS/Services/Vi/ISystemRootService.cs index 9d7ae3fd..09d604c1 100644 --- a/Ryujinx.HLE/HOS/Services/Vi/ISystemRootService.cs +++ b/Ryujinx.HLE/HOS/Services/Vi/ISystemRootService.cs @@ -7,13 +7,13 @@ namespace Ryujinx.HLE.HOS.Services.Vi [Command(1)] // GetDisplayService(u32) -> object<nn::visrv::sf::IApplicationDisplayService> - public long GetDisplayService(ServiceCtx context) + public ResultCode GetDisplayService(ServiceCtx context) { int serviceType = context.RequestData.ReadInt32(); MakeObject(context, new IApplicationDisplayService()); - return 0; + return ResultCode.Success; } } }
\ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Vi/NvFlinger.cs b/Ryujinx.HLE/HOS/Services/Vi/NvFlinger.cs index d6b5fbdb..5db028cc 100644 --- a/Ryujinx.HLE/HOS/Services/Vi/NvFlinger.cs +++ b/Ryujinx.HLE/HOS/Services/Vi/NvFlinger.cs @@ -17,7 +17,7 @@ namespace Ryujinx.HLE.HOS.Services.Android { class NvFlinger : IDisposable { - private delegate long ServiceProcessParcel(ServiceCtx context, BinaryReader parcelReader); + private delegate ResultCode ServiceProcessParcel(ServiceCtx context, BinaryReader parcelReader); private Dictionary<(string, int), ServiceProcessParcel> _commands; @@ -152,7 +152,7 @@ namespace Ryujinx.HLE.HOS.Services.Android _waitBufferFree = new AutoResetEvent(false); } - public long ProcessParcelRequest(ServiceCtx context, byte[] parcelData, int code) + public ResultCode ProcessParcelRequest(ServiceCtx context, byte[] parcelData, int code) { using (MemoryStream ms = new MemoryStream(parcelData)) { @@ -186,7 +186,7 @@ namespace Ryujinx.HLE.HOS.Services.Android } } - private long GbpRequestBuffer(ServiceCtx context, BinaryReader parcelReader) + private ResultCode GbpRequestBuffer(ServiceCtx context, BinaryReader parcelReader) { int slot = parcelReader.ReadInt32(); @@ -210,7 +210,7 @@ namespace Ryujinx.HLE.HOS.Services.Android } } - private long GbpDequeueBuffer(ServiceCtx context, BinaryReader parcelReader) + private ResultCode GbpDequeueBuffer(ServiceCtx context, BinaryReader parcelReader) { // TODO: Errors. int format = parcelReader.ReadInt32(); @@ -224,7 +224,7 @@ namespace Ryujinx.HLE.HOS.Services.Android return MakeReplyParcel(context, slot, 1, 0x24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); } - private long GbpQueueBuffer(ServiceCtx context, BinaryReader parcelReader) + private ResultCode GbpQueueBuffer(ServiceCtx context, BinaryReader parcelReader) { context.Device.Statistics.RecordGameFrameTime(); @@ -252,12 +252,12 @@ namespace Ryujinx.HLE.HOS.Services.Android return MakeReplyParcel(context, 1280, 720, 0, 0, 0); } - private long GbpDetachBuffer(ServiceCtx context, BinaryReader parcelReader) + private ResultCode GbpDetachBuffer(ServiceCtx context, BinaryReader parcelReader) { return MakeReplyParcel(context, 0); } - private long GbpCancelBuffer(ServiceCtx context, BinaryReader parcelReader) + private ResultCode GbpCancelBuffer(ServiceCtx context, BinaryReader parcelReader) { // TODO: Errors. int slot = parcelReader.ReadInt32(); @@ -271,22 +271,22 @@ namespace Ryujinx.HLE.HOS.Services.Android return MakeReplyParcel(context, 0); } - private long GbpQuery(ServiceCtx context, BinaryReader parcelReader) + private ResultCode GbpQuery(ServiceCtx context, BinaryReader parcelReader) { return MakeReplyParcel(context, 0, 0); } - private long GbpConnect(ServiceCtx context, BinaryReader parcelReader) + private ResultCode GbpConnect(ServiceCtx context, BinaryReader parcelReader) { return MakeReplyParcel(context, 1280, 720, 0, 0, 0); } - private long GbpDisconnect(ServiceCtx context, BinaryReader parcelReader) + private ResultCode GbpDisconnect(ServiceCtx context, BinaryReader parcelReader) { return MakeReplyParcel(context, 0); } - private long GbpPreallocBuffer(ServiceCtx context, BinaryReader parcelReader) + private ResultCode GbpPreallocBuffer(ServiceCtx context, BinaryReader parcelReader) { int slot = parcelReader.ReadInt32(); @@ -325,7 +325,7 @@ namespace Ryujinx.HLE.HOS.Services.Android } } - private long MakeReplyParcel(ServiceCtx context, params int[] ints) + private ResultCode MakeReplyParcel(ServiceCtx context, params int[] ints) { using (MemoryStream ms = new MemoryStream()) { @@ -340,7 +340,7 @@ namespace Ryujinx.HLE.HOS.Services.Android } } - private long MakeReplyParcel(ServiceCtx context, byte[] data) + private ResultCode MakeReplyParcel(ServiceCtx context, byte[] data) { (long replyPos, long replySize) = context.Request.GetBufferType0x22(); @@ -348,7 +348,7 @@ namespace Ryujinx.HLE.HOS.Services.Android context.Memory.WriteBytes(replyPos, reply); - return 0; + return ResultCode.Success; } private GalImageFormat ConvertColorFormat(ColorFormat colorFormat) diff --git a/Ryujinx.HLE/HOS/Services/Vi/ResultCode.cs b/Ryujinx.HLE/HOS/Services/Vi/ResultCode.cs new file mode 100644 index 00000000..35ee6ae2 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Vi/ResultCode.cs @@ -0,0 +1,13 @@ +namespace Ryujinx.HLE.HOS.Services.Vi +{ + enum ResultCode + { + ModuleId = 114, + ErrorCodeShift = 9, + + Success = 0, + + InvalidArguments = (1 << ErrorCodeShift) | ModuleId, + InvalidScalingMode = (6 << ErrorCodeShift) | ModuleId + } +}
\ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Vi/ScalingMode.cs b/Ryujinx.HLE/HOS/Services/Vi/ScalingMode.cs index 7b555b59..3adf1d33 100644 --- a/Ryujinx.HLE/HOS/Services/Vi/ScalingMode.cs +++ b/Ryujinx.HLE/HOS/Services/Vi/ScalingMode.cs @@ -17,4 +17,4 @@ None = 3, PreserveAspectRatio = 4 } -} +}
\ No newline at end of file |
