aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.HLE/HOS/Services/Ns/Aoc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Ryujinx.HLE/HOS/Services/Ns/Aoc')
-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
4 files changed, 30 insertions, 14 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
+}