aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.HLE/HOS/Services/Ns
diff options
context:
space:
mode:
Diffstat (limited to 'src/Ryujinx.HLE/HOS/Services/Ns')
-rw-r--r--src/Ryujinx.HLE/HOS/Services/Ns/Aoc/IAddOnContentManager.cs28
-rw-r--r--src/Ryujinx.HLE/HOS/Services/Ns/Aoc/IContentsServiceManager.cs2
-rw-r--r--src/Ryujinx.HLE/HOS/Services/Ns/Aoc/IPurchaseEventManager.cs8
-rw-r--r--src/Ryujinx.HLE/HOS/Services/Ns/Aoc/ResultCode.cs6
-rw-r--r--src/Ryujinx.HLE/HOS/Services/Ns/IApplicationManagerInterface.cs7
-rw-r--r--src/Ryujinx.HLE/HOS/Services/Ns/IDevelopInterface.cs2
-rw-r--r--src/Ryujinx.HLE/HOS/Services/Ns/IReadOnlyApplicationControlDataInterface.cs2
-rw-r--r--src/Ryujinx.HLE/HOS/Services/Ns/IServiceGetterInterface.cs2
-rw-r--r--src/Ryujinx.HLE/HOS/Services/Ns/ISystemUpdateInterface.cs2
-rw-r--r--src/Ryujinx.HLE/HOS/Services/Ns/IVulnerabilityManagerInterface.cs2
10 files changed, 40 insertions, 21 deletions
diff --git a/src/Ryujinx.HLE/HOS/Services/Ns/Aoc/IAddOnContentManager.cs b/src/Ryujinx.HLE/HOS/Services/Ns/Aoc/IAddOnContentManager.cs
index b4b5bb1f..083a8321 100644
--- a/src/Ryujinx.HLE/HOS/Services/Ns/Aoc/IAddOnContentManager.cs
+++ b/src/Ryujinx.HLE/HOS/Services/Ns/Aoc/IAddOnContentManager.cs
@@ -11,11 +11,11 @@ namespace Ryujinx.HLE.HOS.Services.Ns.Aoc
class IAddOnContentManager : IpcService
{
private readonly KEvent _addOnContentListChangedEvent;
- private int _addOnContentListChangedEventHandle;
+ private int _addOnContentListChangedEventHandle;
private ulong _addOnContentBaseId;
- private List<ulong> _mountedAocTitleIds = new List<ulong>();
+ private readonly List<ulong> _mountedAocTitleIds = new();
public IAddOnContentManager(ServiceCtx context)
{
@@ -44,7 +44,9 @@ namespace Ryujinx.HLE.HOS.Services.Ns.Aoc
// CountAddOnContent(pid) -> u32
public ResultCode CountAddOnContent(ServiceCtx context)
{
+#pragma warning disable IDE0059 // Remove unnecessary value assignment
ulong pid = context.Request.HandleDesc.PId;
+#pragma warning restore IDE0059
// NOTE: Service call arp:r GetApplicationLaunchProperty to get TitleId using the PId.
@@ -55,7 +57,9 @@ namespace Ryujinx.HLE.HOS.Services.Ns.Aoc
// ListAddOnContent(u32 start_index, u32 buffer_size, pid) -> (u32 count, buffer<u32>)
public ResultCode ListAddOnContent(ServiceCtx context)
{
+#pragma warning disable IDE0059 // Remove unnecessary value assignment
ulong pid = context.Request.HandleDesc.PId;
+#pragma warning restore IDE0059
// NOTE: Service call arp:r GetApplicationLaunchProperty to get TitleId using the PId.
@@ -75,7 +79,9 @@ namespace Ryujinx.HLE.HOS.Services.Ns.Aoc
// GetAddOnContentBaseId(pid) -> u64
public ResultCode GetAddOnContentBaseId(ServiceCtx context)
{
+#pragma warning disable IDE0059 // Remove unnecessary value assignment
ulong pid = context.Request.HandleDesc.PId;
+#pragma warning restore IDE0059
// NOTE: Service call arp:r GetApplicationLaunchProperty to get TitleId using the PId.
@@ -95,7 +101,9 @@ namespace Ryujinx.HLE.HOS.Services.Ns.Aoc
// PrepareAddOnContent(u32 index, pid)
public ResultCode PrepareAddOnContent(ServiceCtx context)
{
+#pragma warning disable IDE0059 // Remove unnecessary value assignment
ulong pid = context.Request.HandleDesc.PId;
+#pragma warning restore IDE0059
// NOTE: Service call arp:r GetApplicationLaunchProperty to get TitleId using the PId.
@@ -123,7 +131,9 @@ namespace Ryujinx.HLE.HOS.Services.Ns.Aoc
// GetAddOnContentListChangedEventWithProcessId(pid) -> handle<copy>
public ResultCode GetAddOnContentListChangedEventWithProcessId(ServiceCtx context)
{
+#pragma warning disable IDE0059 // Remove unnecessary value assignment
ulong pid = context.Request.HandleDesc.PId;
+#pragma warning restore IDE0059
// NOTE: Service call arp:r GetApplicationLaunchProperty to get TitleId using the PId.
@@ -142,7 +152,9 @@ namespace Ryujinx.HLE.HOS.Services.Ns.Aoc
// NotifyMountAddOnContent(pid, u64 title_id)
public ResultCode NotifyMountAddOnContent(ServiceCtx context)
{
+#pragma warning disable IDE0059 // Remove unnecessary value assignment
ulong pid = context.Request.HandleDesc.PId;
+#pragma warning restore IDE0059
// NOTE: Service call arp:r GetApplicationLaunchProperty to get TitleId using the PId.
@@ -160,7 +172,9 @@ namespace Ryujinx.HLE.HOS.Services.Ns.Aoc
// NotifyUnmountAddOnContent(pid, u64 title_id)
public ResultCode NotifyUnmountAddOnContent(ServiceCtx context)
{
+#pragma warning disable IDE0059 // Remove unnecessary value assignment
ulong pid = context.Request.HandleDesc.PId;
+#pragma warning restore IDE0059
// NOTE: Service call arp:r GetApplicationLaunchProperty to get TitleId using the PId.
@@ -175,7 +189,9 @@ namespace Ryujinx.HLE.HOS.Services.Ns.Aoc
// CheckAddOnContentMountStatus(pid)
public ResultCode CheckAddOnContentMountStatus(ServiceCtx context)
{
+#pragma warning disable IDE0059 // Remove unnecessary value assignment
ulong pid = context.Request.HandleDesc.PId;
+#pragma warning restore IDE0059
// NOTE: Service call arp:r GetApplicationLaunchProperty to get TitleId using the PId.
// Then it does some internal checks and returns InvalidBufferSize if they fail.
@@ -239,10 +255,10 @@ namespace Ryujinx.HLE.HOS.Services.Ns.Aoc
// NOTE: Service call sys:set GetQuestFlag and store it internally.
// If QuestFlag is true, counts some extra titles.
- uint startIndex = context.RequestData.ReadUInt32();
- uint indexNumber = context.RequestData.ReadUInt32();
+ uint startIndex = context.RequestData.ReadUInt32();
+ uint indexNumber = context.RequestData.ReadUInt32();
ulong bufferPosition = context.Request.ReceiveBuff[0].Position;
- ulong bufferSize = context.Request.ReceiveBuff[0].Size;
+ ulong bufferSize = context.Request.ReceiveBuff[0].Size;
// TODO: This should use _addOnContentBaseId;
uint aocTotalCount = (uint)context.Device.System.ContentManager.GetAocCount();
@@ -343,4 +359,4 @@ namespace Ryujinx.HLE.HOS.Services.Ns.Aoc
return ((ulong)errorCode & 0x1FF | ((((ulong)errorCode >> 9) & 0x1FFF) << 32)) + 2000;
}
}
-} \ No newline at end of file
+}
diff --git a/src/Ryujinx.HLE/HOS/Services/Ns/Aoc/IContentsServiceManager.cs b/src/Ryujinx.HLE/HOS/Services/Ns/Aoc/IContentsServiceManager.cs
index cb8903d4..40b0b2a8 100644
--- a/src/Ryujinx.HLE/HOS/Services/Ns/Aoc/IContentsServiceManager.cs
+++ b/src/Ryujinx.HLE/HOS/Services/Ns/Aoc/IContentsServiceManager.cs
@@ -4,4 +4,4 @@ namespace Ryujinx.HLE.HOS.Services.Ns.Aoc
{
public IContentsServiceManager() { }
}
-} \ No newline at end of file
+}
diff --git a/src/Ryujinx.HLE/HOS/Services/Ns/Aoc/IPurchaseEventManager.cs b/src/Ryujinx.HLE/HOS/Services/Ns/Aoc/IPurchaseEventManager.cs
index 1673fafc..c92a10d6 100644
--- a/src/Ryujinx.HLE/HOS/Services/Ns/Aoc/IPurchaseEventManager.cs
+++ b/src/Ryujinx.HLE/HOS/Services/Ns/Aoc/IPurchaseEventManager.cs
@@ -19,9 +19,9 @@ namespace Ryujinx.HLE.HOS.Services.Ns.Aoc
// SetDefaultDeliveryTarget(pid, buffer<bytes, 5> unknown)
public ResultCode SetDefaultDeliveryTarget(ServiceCtx context)
{
- ulong inBufferPosition = context.Request.SendBuff[0].Position;
- ulong inBufferSize = context.Request.SendBuff[0].Size;
- byte[] buffer = new byte[inBufferSize];
+ ulong inBufferPosition = context.Request.SendBuff[0].Position;
+ ulong inBufferSize = context.Request.SendBuff[0].Size;
+ byte[] buffer = new byte[inBufferSize];
context.Memory.Read(inBufferPosition, buffer);
@@ -65,4 +65,4 @@ namespace Ryujinx.HLE.HOS.Services.Ns.Aoc
return ResultCode.Success;
}
}
-} \ No newline at end of file
+}
diff --git a/src/Ryujinx.HLE/HOS/Services/Ns/Aoc/ResultCode.cs b/src/Ryujinx.HLE/HOS/Services/Ns/Aoc/ResultCode.cs
index 7602ecb3..b795a756 100644
--- a/src/Ryujinx.HLE/HOS/Services/Ns/Aoc/ResultCode.cs
+++ b/src/Ryujinx.HLE/HOS/Services/Ns/Aoc/ResultCode.cs
@@ -2,12 +2,12 @@ namespace Ryujinx.HLE.HOS.Services.Ns.Aoc
{
enum ResultCode
{
- ModuleId = 166,
+ ModuleId = 166,
ErrorCodeShift = 9,
Success = 0,
InvalidBufferSize = (200 << ErrorCodeShift) | ModuleId,
- InvalidPid = (300 << ErrorCodeShift) | ModuleId
+ InvalidPid = (300 << ErrorCodeShift) | ModuleId,
}
-} \ No newline at end of file
+}
diff --git a/src/Ryujinx.HLE/HOS/Services/Ns/IApplicationManagerInterface.cs b/src/Ryujinx.HLE/HOS/Services/Ns/IApplicationManagerInterface.cs
index 06e911f8..a8a2a8e0 100644
--- a/src/Ryujinx.HLE/HOS/Services/Ns/IApplicationManagerInterface.cs
+++ b/src/Ryujinx.HLE/HOS/Services/Ns/IApplicationManagerInterface.cs
@@ -1,6 +1,5 @@
using LibHac.Ns;
using Ryujinx.Common.Utilities;
-using System;
namespace Ryujinx.HLE.HOS.Services.Ns
{
@@ -13,8 +12,10 @@ namespace Ryujinx.HLE.HOS.Services.Ns
// GetApplicationControlData(u8, u64) -> (unknown<4>, buffer<unknown, 6>)
public ResultCode GetApplicationControlData(ServiceCtx context)
{
- byte source = (byte)context.RequestData.ReadInt64();
+#pragma warning disable IDE0059 // Remove unnecessary value assignment
+ byte source = (byte)context.RequestData.ReadInt64();
ulong titleId = context.RequestData.ReadUInt64();
+#pragma warning restore IDE0059
ulong position = context.Request.ReceiveBuff[0].Position;
@@ -25,4 +26,4 @@ namespace Ryujinx.HLE.HOS.Services.Ns
return ResultCode.Success;
}
}
-} \ No newline at end of file
+}
diff --git a/src/Ryujinx.HLE/HOS/Services/Ns/IDevelopInterface.cs b/src/Ryujinx.HLE/HOS/Services/Ns/IDevelopInterface.cs
index c74ebd69..8f0f6cbe 100644
--- a/src/Ryujinx.HLE/HOS/Services/Ns/IDevelopInterface.cs
+++ b/src/Ryujinx.HLE/HOS/Services/Ns/IDevelopInterface.cs
@@ -5,4 +5,4 @@ namespace Ryujinx.HLE.HOS.Services.Ns
{
public IDevelopInterface(ServiceCtx context) { }
}
-} \ No newline at end of file
+}
diff --git a/src/Ryujinx.HLE/HOS/Services/Ns/IReadOnlyApplicationControlDataInterface.cs b/src/Ryujinx.HLE/HOS/Services/Ns/IReadOnlyApplicationControlDataInterface.cs
index aa37a1e7..8327d619 100644
--- a/src/Ryujinx.HLE/HOS/Services/Ns/IReadOnlyApplicationControlDataInterface.cs
+++ b/src/Ryujinx.HLE/HOS/Services/Ns/IReadOnlyApplicationControlDataInterface.cs
@@ -11,8 +11,10 @@ namespace Ryujinx.HLE.HOS.Services.Ns
// GetApplicationControlData(u8, u64) -> (unknown<4>, buffer<unknown, 6>)
public ResultCode GetApplicationControlData(ServiceCtx context)
{
+#pragma warning disable IDE0059 // Remove unnecessary value assignment
byte source = (byte)context.RequestData.ReadInt64();
ulong titleId = context.RequestData.ReadUInt64();
+#pragma warning restore IDE0059
ulong position = context.Request.ReceiveBuff[0].Position;
diff --git a/src/Ryujinx.HLE/HOS/Services/Ns/IServiceGetterInterface.cs b/src/Ryujinx.HLE/HOS/Services/Ns/IServiceGetterInterface.cs
index 886bffdd..e45c6750 100644
--- a/src/Ryujinx.HLE/HOS/Services/Ns/IServiceGetterInterface.cs
+++ b/src/Ryujinx.HLE/HOS/Services/Ns/IServiceGetterInterface.cs
@@ -27,4 +27,4 @@ namespace Ryujinx.HLE.HOS.Services.Ns
return ResultCode.Success;
}
}
-} \ No newline at end of file
+}
diff --git a/src/Ryujinx.HLE/HOS/Services/Ns/ISystemUpdateInterface.cs b/src/Ryujinx.HLE/HOS/Services/Ns/ISystemUpdateInterface.cs
index 84ed3d0f..1108778c 100644
--- a/src/Ryujinx.HLE/HOS/Services/Ns/ISystemUpdateInterface.cs
+++ b/src/Ryujinx.HLE/HOS/Services/Ns/ISystemUpdateInterface.cs
@@ -5,4 +5,4 @@ namespace Ryujinx.HLE.HOS.Services.Ns
{
public ISystemUpdateInterface(ServiceCtx context) { }
}
-} \ No newline at end of file
+}
diff --git a/src/Ryujinx.HLE/HOS/Services/Ns/IVulnerabilityManagerInterface.cs b/src/Ryujinx.HLE/HOS/Services/Ns/IVulnerabilityManagerInterface.cs
index 0b640992..c1ec50bc 100644
--- a/src/Ryujinx.HLE/HOS/Services/Ns/IVulnerabilityManagerInterface.cs
+++ b/src/Ryujinx.HLE/HOS/Services/Ns/IVulnerabilityManagerInterface.cs
@@ -5,4 +5,4 @@ namespace Ryujinx.HLE.HOS.Services.Ns
{
public IVulnerabilityManagerInterface(ServiceCtx context) { }
}
-} \ No newline at end of file
+}