From aa932a6df1764b7c600ae0ba4e0c7a0ba802f312 Mon Sep 17 00:00:00 2001 From: Alex Barney Date: Thu, 23 Dec 2021 09:55:50 -0700 Subject: Update to LibHac v0.14.3 (#2925) * Update to LibHac v0.14.3 * Fix loading NCAs that don't have a data partition --- Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/IStorage.cs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/IStorage.cs') diff --git a/Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/IStorage.cs b/Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/IStorage.cs index 08f5b87b..9dbfd2b0 100644 --- a/Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/IStorage.cs +++ b/Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/IStorage.cs @@ -1,4 +1,5 @@ using LibHac; +using LibHac.Common; using LibHac.Sf; using Ryujinx.HLE.HOS.Ipc; @@ -6,11 +7,11 @@ namespace Ryujinx.HLE.HOS.Services.Fs.FileSystemProxy { class IStorage : DisposableIpcService { - private ReferenceCountedDisposable _baseStorage; + private SharedRef _baseStorage; - public IStorage(ReferenceCountedDisposable baseStorage) + public IStorage(ref SharedRef baseStorage) { - _baseStorage = baseStorage; + _baseStorage = SharedRef.CreateMove(ref baseStorage); } [CommandHipc(0)] @@ -32,7 +33,7 @@ namespace Ryujinx.HLE.HOS.Services.Fs.FileSystemProxy byte[] data = new byte[size]; - Result result = _baseStorage.Target.Read((long)offset, new OutBuffer(data), (long)size); + Result result = _baseStorage.Get.Read((long)offset, new OutBuffer(data), (long)size); context.Memory.Write(buffDesc.Position, data); @@ -46,7 +47,7 @@ namespace Ryujinx.HLE.HOS.Services.Fs.FileSystemProxy // GetSize() -> u64 size public ResultCode GetSize(ServiceCtx context) { - Result result = _baseStorage.Target.GetSize(out long size); + Result result = _baseStorage.Get.GetSize(out long size); context.ResponseData.Write(size); @@ -57,7 +58,7 @@ namespace Ryujinx.HLE.HOS.Services.Fs.FileSystemProxy { if (isDisposing) { - _baseStorage?.Dispose(); + _baseStorage.Destroy(); } } } -- cgit v1.2.3