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
cb43cc7e32
commit
aa932a6df1
33 changed files with 554 additions and 406 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue