aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.HLE/HOS/Services/Ncm
diff options
context:
space:
mode:
Diffstat (limited to 'src/Ryujinx.HLE/HOS/Services/Ncm')
-rw-r--r--src/Ryujinx.HLE/HOS/Services/Ncm/IContentManager.cs2
-rw-r--r--src/Ryujinx.HLE/HOS/Services/Ncm/Lr/ILocationResolverManager.cs2
-rw-r--r--src/Ryujinx.HLE/HOS/Services/Ncm/Lr/LocationResolverManager/ILocationResolver.cs17
-rw-r--r--src/Ryujinx.HLE/HOS/Services/Ncm/Lr/ResultCode.cs20
4 files changed, 22 insertions, 19 deletions
diff --git a/src/Ryujinx.HLE/HOS/Services/Ncm/IContentManager.cs b/src/Ryujinx.HLE/HOS/Services/Ncm/IContentManager.cs
index 7f05d9be..cf0d4149 100644
--- a/src/Ryujinx.HLE/HOS/Services/Ncm/IContentManager.cs
+++ b/src/Ryujinx.HLE/HOS/Services/Ncm/IContentManager.cs
@@ -5,4 +5,4 @@
{
public IContentManager(ServiceCtx context) { }
}
-} \ No newline at end of file
+}
diff --git a/src/Ryujinx.HLE/HOS/Services/Ncm/Lr/ILocationResolverManager.cs b/src/Ryujinx.HLE/HOS/Services/Ncm/Lr/ILocationResolverManager.cs
index 318ad30e..f5921678 100644
--- a/src/Ryujinx.HLE/HOS/Services/Ncm/Lr/ILocationResolverManager.cs
+++ b/src/Ryujinx.HLE/HOS/Services/Ncm/Lr/ILocationResolverManager.cs
@@ -19,4 +19,4 @@ namespace Ryujinx.HLE.HOS.Services.Ncm.Lr
return ResultCode.Success;
}
}
-} \ No newline at end of file
+}
diff --git a/src/Ryujinx.HLE/HOS/Services/Ncm/Lr/LocationResolverManager/ILocationResolver.cs b/src/Ryujinx.HLE/HOS/Services/Ncm/Lr/LocationResolverManager/ILocationResolver.cs
index 55b49bce..f5a0c665 100644
--- a/src/Ryujinx.HLE/HOS/Services/Ncm/Lr/LocationResolverManager/ILocationResolver.cs
+++ b/src/Ryujinx.HLE/HOS/Services/Ncm/Lr/LocationResolverManager/ILocationResolver.cs
@@ -2,14 +2,13 @@
using LibHac.Tools.FsSystem.NcaUtils;
using Ryujinx.HLE.FileSystem;
using System.Text;
-
using static Ryujinx.HLE.Utilities.StringUtils;
namespace Ryujinx.HLE.HOS.Services.Ncm.Lr.LocationResolverManager
{
class ILocationResolver : IpcService
{
- private StorageId _storageId;
+ private readonly StorageId _storageId;
public ILocationResolver(StorageId storageId)
{
@@ -215,8 +214,8 @@ namespace Ryujinx.HLE.HOS.Services.Ncm.Lr.LocationResolverManager
private void RedirectPath(ServiceCtx context, ulong titleId, int flag, NcaContentType contentType)
{
- string contentPath = ReadUtf8String(context);
- LocationEntry newLocation = new LocationEntry(contentPath, flag, titleId, contentType);
+ string contentPath = ReadUtf8String(context);
+ LocationEntry newLocation = new(contentPath, flag, titleId, contentType);
context.Device.System.ContentManager.RedirectLocation(newLocation, _storageId);
}
@@ -224,12 +223,14 @@ namespace Ryujinx.HLE.HOS.Services.Ncm.Lr.LocationResolverManager
private bool ResolvePath(ServiceCtx context, ulong titleId, NcaContentType contentType)
{
ContentManager contentManager = context.Device.System.ContentManager;
- string contentPath = contentManager.GetInstalledContentPath(titleId, _storageId, NcaContentType.Program);
+ string contentPath = contentManager.GetInstalledContentPath(titleId, _storageId, NcaContentType.Program);
if (!string.IsNullOrWhiteSpace(contentPath))
{
ulong position = context.Request.RecvListBuff[0].Position;
- ulong size = context.Request.RecvListBuff[0].Size;
+#pragma warning disable IDE0059 // Remove unnecessary value assignment
+ ulong size = context.Request.RecvListBuff[0].Size;
+#pragma warning restore IDE0059
byte[] contentPathBuffer = Encoding.UTF8.GetBytes(contentPath);
@@ -246,7 +247,9 @@ namespace Ryujinx.HLE.HOS.Services.Ncm.Lr.LocationResolverManager
private void DeleteContentPath(ServiceCtx context, ulong titleId, NcaContentType contentType)
{
ContentManager contentManager = context.Device.System.ContentManager;
- string contentPath = contentManager.GetInstalledContentPath(titleId, _storageId, NcaContentType.Manual);
+#pragma warning disable IDE0059 // Remove unnecessary value assignment
+ string contentPath = contentManager.GetInstalledContentPath(titleId, _storageId, NcaContentType.Manual);
+#pragma warning restore IDE0059
contentManager.ClearEntry(titleId, NcaContentType.Manual, _storageId);
}
diff --git a/src/Ryujinx.HLE/HOS/Services/Ncm/Lr/ResultCode.cs b/src/Ryujinx.HLE/HOS/Services/Ncm/Lr/ResultCode.cs
index d21fe634..3a027fd0 100644
--- a/src/Ryujinx.HLE/HOS/Services/Ncm/Lr/ResultCode.cs
+++ b/src/Ryujinx.HLE/HOS/Services/Ncm/Lr/ResultCode.cs
@@ -2,19 +2,19 @@
{
enum ResultCode
{
- ModuleId = 8,
+ ModuleId = 8,
ErrorCodeShift = 9,
Success = 0,
- ProgramLocationEntryNotFound = (2 << ErrorCodeShift) | ModuleId,
- InvalidContextForControlLocation = (3 << ErrorCodeShift) | ModuleId,
- StorageNotFound = (4 << ErrorCodeShift) | ModuleId,
- AccessDenied = (5 << ErrorCodeShift) | ModuleId,
- OfflineManualHTMLLocationEntryNotFound = (6 << ErrorCodeShift) | ModuleId,
- TitleIsNotRegistered = (7 << ErrorCodeShift) | ModuleId,
- ControlLocationEntryForHostNotFound = (8 << ErrorCodeShift) | ModuleId,
- LegalInfoHTMLLocationEntryNotFound = (9 << ErrorCodeShift) | ModuleId,
- ProgramLocationForDebugEntryNotFound = (10 << ErrorCodeShift) | ModuleId
+ ProgramLocationEntryNotFound = (2 << ErrorCodeShift) | ModuleId,
+ InvalidContextForControlLocation = (3 << ErrorCodeShift) | ModuleId,
+ StorageNotFound = (4 << ErrorCodeShift) | ModuleId,
+ AccessDenied = (5 << ErrorCodeShift) | ModuleId,
+ OfflineManualHTMLLocationEntryNotFound = (6 << ErrorCodeShift) | ModuleId,
+ TitleIsNotRegistered = (7 << ErrorCodeShift) | ModuleId,
+ ControlLocationEntryForHostNotFound = (8 << ErrorCodeShift) | ModuleId,
+ LegalInfoHTMLLocationEntryNotFound = (9 << ErrorCodeShift) | ModuleId,
+ ProgramLocationForDebugEntryNotFound = (10 << ErrorCodeShift) | ModuleId,
}
}