aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Ui.Common/App/ApplicationLibrary.cs
diff options
context:
space:
mode:
authorAlex Barney <thealexbarney@gmail.com>2023-10-22 16:30:46 -0700
committerGitHub <noreply@github.com>2023-10-22 20:30:46 -0300
commitd773d5152e685a164a6eb9f419873ef1908364f7 (patch)
tree7820ebb263e6b5b958fa76782260efd95b88a091 /src/Ryujinx.Ui.Common/App/ApplicationLibrary.cs
parent33ba1703158564c2c3564fa329fd2e630f8a8e95 (diff)
Update to LibHac 0.19.0 (#5831)1.1.1061
* Update to LibHac v0.19.0 - PartitionFileSystem classes now fully match Nintendo's implementation. Current code creating a PartitionFileSystem now need to use the Initialize method. - Implementing nn::gcsrv and nn::sdmmcsrv now means the FS server now uses that abstraction instead of the old one where we passed in an IDeviceOperator. * Add GetFileSystemAttribute
Diffstat (limited to 'src/Ryujinx.Ui.Common/App/ApplicationLibrary.cs')
-rw-r--r--src/Ryujinx.Ui.Common/App/ApplicationLibrary.cs19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/Ryujinx.Ui.Common/App/ApplicationLibrary.cs b/src/Ryujinx.Ui.Common/App/ApplicationLibrary.cs
index 36b2b727..2f688126 100644
--- a/src/Ryujinx.Ui.Common/App/ApplicationLibrary.cs
+++ b/src/Ryujinx.Ui.Common/App/ApplicationLibrary.cs
@@ -174,7 +174,7 @@ namespace Ryujinx.Ui.App.Common
{
try
{
- PartitionFileSystem pfs;
+ IFileSystem pfs;
bool isExeFs = false;
@@ -186,7 +186,9 @@ namespace Ryujinx.Ui.App.Common
}
else
{
- pfs = new PartitionFileSystem(file.AsStorage());
+ var pfsTemp = new PartitionFileSystem();
+ pfsTemp.Initialize(file.AsStorage()).ThrowIfFailure();
+ pfs = pfsTemp;
// If the NSP doesn't have a main NCA, decrement the number of applications found and then continue to the next application.
bool hasMainNca = false;
@@ -500,7 +502,7 @@ namespace Ryujinx.Ui.App.Common
ApplicationCountUpdated?.Invoke(null, e);
}
- private void GetControlFsAndTitleId(PartitionFileSystem pfs, out IFileSystem controlFs, out string titleId)
+ private void GetControlFsAndTitleId(IFileSystem pfs, out IFileSystem controlFs, out string titleId)
{
(_, _, Nca controlNca) = GetGameData(_virtualFileSystem, pfs, 0);
@@ -563,7 +565,7 @@ namespace Ryujinx.Ui.App.Common
{
try
{
- PartitionFileSystem pfs;
+ IFileSystem pfs;
bool isExeFs = false;
@@ -575,7 +577,9 @@ namespace Ryujinx.Ui.App.Common
}
else
{
- pfs = new PartitionFileSystem(file.AsStorage());
+ var pfsTemp = new PartitionFileSystem();
+ pfsTemp.Initialize(file.AsStorage()).ThrowIfFailure();
+ pfs = pfsTemp;
foreach (DirectoryEntryEx fileEntry in pfs.EnumerateEntries("/", "*"))
{
@@ -827,7 +831,7 @@ namespace Ryujinx.Ui.App.Common
return false;
}
- public static (Nca main, Nca patch, Nca control) GetGameData(VirtualFileSystem fileSystem, PartitionFileSystem pfs, int programIndex)
+ public static (Nca main, Nca patch, Nca control) GetGameData(VirtualFileSystem fileSystem, IFileSystem pfs, int programIndex)
{
Nca mainNca = null;
Nca patchNca = null;
@@ -931,7 +935,8 @@ namespace Ryujinx.Ui.App.Common
if (File.Exists(updatePath))
{
FileStream file = new(updatePath, FileMode.Open, FileAccess.Read);
- PartitionFileSystem nsp = new(file.AsStorage());
+ PartitionFileSystem nsp = new();
+ nsp.Initialize(file.AsStorage()).ThrowIfFailure();
return GetGameUpdateDataFromPartition(fileSystem, nsp, titleIdBase.ToString("x16"), programIndex);
}