Update to LibHac 0.12.0 (#1485)

* Update to LibHac 0.12.0

* Auto-formatting. Fixed a bug in SetApplicationCopyrightImage
This commit is contained in:
Alex Barney 2020-09-01 13:08:59 -07:00 committed by GitHub
parent 6cc187da59
commit 1bb7fdaca4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 122 additions and 110 deletions

View file

@ -1,5 +1,5 @@
using LibHac.Fs;
using LibHac.Loader;
using LibHac.Kernel;
using System;
namespace Ryujinx.HLE.Loaders.Executables
@ -31,6 +31,7 @@ namespace Ryujinx.HLE.Loaders.Executables
public byte IdealCoreId { get; }
public int Version { get; }
public string Name { get; }
public KipExecutable(IStorage inStorage)
{
KipReader reader = new KipReader();
@ -70,11 +71,11 @@ namespace Ryujinx.HLE.Loaders.Executables
DataSize = DecompressSection(reader, KipReader.SegmentType.Data, DataOffset, Program);
}
private static int DecompressSection(KipReader reader, KipReader.SegmentType segmentType, int offset, byte[] Program)
private static int DecompressSection(KipReader reader, KipReader.SegmentType segmentType, int offset, byte[] program)
{
reader.GetSegmentSize(segmentType, out int uncompressedSize).ThrowIfFailure();
var span = Program.AsSpan().Slice(offset, uncompressedSize);
var span = program.AsSpan().Slice(offset, uncompressedSize);
reader.ReadSegment(segmentType, span).ThrowIfFailure();