diff options
| author | Alex Barney <thealexbarney@gmail.com> | 2021-12-23 09:55:50 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-23 13:55:50 -0300 |
| commit | aa932a6df1764b7c600ae0ba4e0c7a0ba802f312 (patch) | |
| tree | 24a390cf2330620aeeab1efbd42ae4099f61ca86 /Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/IStorage.cs | |
| parent | cb43cc7e322014ce2bd0ee73b06d403be62fa8d5 (diff) | |
Update to LibHac v0.14.3 (#2925)
* Update to LibHac v0.14.3
* Fix loading NCAs that don't have a data partition
Diffstat (limited to 'Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/IStorage.cs')
| -rw-r--r-- | Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/IStorage.cs | 13 |
1 files changed, 7 insertions, 6 deletions
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<LibHac.FsSrv.Sf.IStorage> _baseStorage; + private SharedRef<LibHac.FsSrv.Sf.IStorage> _baseStorage; - public IStorage(ReferenceCountedDisposable<LibHac.FsSrv.Sf.IStorage> baseStorage) + public IStorage(ref SharedRef<LibHac.FsSrv.Sf.IStorage> baseStorage) { - _baseStorage = baseStorage; + _baseStorage = SharedRef<LibHac.FsSrv.Sf.IStorage>.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(); } } } |
