mirror of
https://git.743378673.xyz/MeloNX/MeloNX.git
synced 2025-08-02 11:37:09 +02:00
Update to LibHac v0.14.3 (#2925)
* Update to LibHac v0.14.3 * Fix loading NCAs that don't have a data partition
This commit is contained in:
parent
0f32349760
commit
c07ce51fa7
33 changed files with 554 additions and 406 deletions
|
@ -130,12 +130,14 @@ namespace Ryujinx.Ui.Windows
|
|||
|
||||
if (item.Type == DirectoryEntryType.File && item.FullPath.Contains("chara") && item.FullPath.Contains("szs"))
|
||||
{
|
||||
romfs.OpenFile(out IFile file, ("/" + item.FullPath).ToU8Span(), OpenMode.Read).ThrowIfFailure();
|
||||
using var file = new UniqueRef<IFile>();
|
||||
|
||||
romfs.OpenFile(ref file.Ref(), ("/" + item.FullPath).ToU8Span(), OpenMode.Read).ThrowIfFailure();
|
||||
|
||||
using (MemoryStream stream = new MemoryStream())
|
||||
using (MemoryStream streamPng = new MemoryStream())
|
||||
{
|
||||
file.AsStream().CopyTo(stream);
|
||||
file.Get.AsStream().CopyTo(stream);
|
||||
|
||||
stream.Position = 0;
|
||||
|
||||
|
|
|
@ -89,8 +89,10 @@ namespace Ryujinx.Ui.Windows
|
|||
|
||||
foreach (DlcNca dlcNca in dlcContainer.DlcNcaList)
|
||||
{
|
||||
pfs.OpenFile(out IFile ncaFile, dlcNca.Path.ToU8Span(), OpenMode.Read).ThrowIfFailure();
|
||||
Nca nca = TryCreateNca(ncaFile.AsStorage(), dlcContainer.Path);
|
||||
using var ncaFile = new UniqueRef<IFile>();
|
||||
|
||||
pfs.OpenFile(ref ncaFile.Ref(), dlcNca.Path.ToU8Span(), OpenMode.Read).ThrowIfFailure();
|
||||
Nca nca = TryCreateNca(ncaFile.Get.AsStorage(), dlcContainer.Path);
|
||||
|
||||
if (nca != null)
|
||||
{
|
||||
|
@ -155,9 +157,11 @@ namespace Ryujinx.Ui.Windows
|
|||
|
||||
foreach (DirectoryEntryEx fileEntry in pfs.EnumerateEntries("/", "*.nca"))
|
||||
{
|
||||
pfs.OpenFile(out IFile ncaFile, fileEntry.FullPath.ToU8Span(), OpenMode.Read).ThrowIfFailure();
|
||||
using var ncaFile = new UniqueRef<IFile>();
|
||||
|
||||
Nca nca = TryCreateNca(ncaFile.AsStorage(), containerPath);
|
||||
pfs.OpenFile(ref ncaFile.Ref(), fileEntry.FullPath.ToU8Span(), OpenMode.Read).ThrowIfFailure();
|
||||
|
||||
Nca nca = TryCreateNca(ncaFile.Get.AsStorage(), containerPath);
|
||||
|
||||
if (nca == null) continue;
|
||||
|
||||
|
|
|
@ -99,8 +99,10 @@ namespace Ryujinx.Ui.Windows
|
|||
{
|
||||
ApplicationControlProperty controlData = new ApplicationControlProperty();
|
||||
|
||||
controlNca.OpenFileSystem(NcaSectionType.Data, IntegrityCheckLevel.None).OpenFile(out IFile nacpFile, "/control.nacp".ToU8Span(), OpenMode.Read).ThrowIfFailure();
|
||||
nacpFile.Read(out _, 0, SpanHelpers.AsByteSpan(ref controlData), ReadOption.None).ThrowIfFailure();
|
||||
using var nacpFile = new UniqueRef<IFile>();
|
||||
|
||||
controlNca.OpenFileSystem(NcaSectionType.Data, IntegrityCheckLevel.None).OpenFile(ref nacpFile.Ref(), "/control.nacp".ToU8Span(), OpenMode.Read).ThrowIfFailure();
|
||||
nacpFile.Get.Read(out _, 0, SpanHelpers.AsByteSpan(ref controlData), ReadOption.None).ThrowIfFailure();
|
||||
|
||||
RadioButton radioButton = new RadioButton($"Version {controlData.DisplayVersion.ToString()} - {path}");
|
||||
radioButton.JoinGroup(_noUpdateRadioButton);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue