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:
Alex Barney 2021-12-23 09:55:50 -07:00 committed by GitHub
parent cb43cc7e32
commit aa932a6df1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
33 changed files with 554 additions and 406 deletions

View file

@ -1,22 +1,23 @@
using LibHac;
using LibHac.Common;
using LibHac.FsSrv;
namespace Ryujinx.HLE.HOS.Services.Fs
{
class IDeviceOperator : DisposableIpcService
{
private ReferenceCountedDisposable<LibHac.FsSrv.Sf.IDeviceOperator> _baseOperator;
private SharedRef<LibHac.FsSrv.Sf.IDeviceOperator> _baseOperator;
public IDeviceOperator(ReferenceCountedDisposable<LibHac.FsSrv.Sf.IDeviceOperator> baseOperator)
public IDeviceOperator(ref SharedRef<LibHac.FsSrv.Sf.IDeviceOperator> baseOperator)
{
_baseOperator = baseOperator;
_baseOperator = SharedRef<LibHac.FsSrv.Sf.IDeviceOperator>.CreateMove(ref baseOperator);
}
[CommandHipc(0)]
// IsSdCardInserted() -> b8 is_inserted
public ResultCode IsSdCardInserted(ServiceCtx context)
{
Result result = _baseOperator.Target.IsSdCardInserted(out bool isInserted);
Result result = _baseOperator.Get.IsSdCardInserted(out bool isInserted);
context.ResponseData.Write(isInserted);
@ -27,7 +28,7 @@ namespace Ryujinx.HLE.HOS.Services.Fs
// IsGameCardInserted() -> b8 is_inserted
public ResultCode IsGameCardInserted(ServiceCtx context)
{
Result result = _baseOperator.Target.IsGameCardInserted(out bool isInserted);
Result result = _baseOperator.Get.IsGameCardInserted(out bool isInserted);
context.ResponseData.Write(isInserted);
@ -38,7 +39,7 @@ namespace Ryujinx.HLE.HOS.Services.Fs
// GetGameCardHandle() -> u32 gamecard_handle
public ResultCode GetGameCardHandle(ServiceCtx context)
{
Result result = _baseOperator.Target.GetGameCardHandle(out GameCardHandle handle);
Result result = _baseOperator.Get.GetGameCardHandle(out GameCardHandle handle);
context.ResponseData.Write(handle.Value);
@ -49,7 +50,7 @@ namespace Ryujinx.HLE.HOS.Services.Fs
{
if (isDisposing)
{
_baseOperator?.Dispose();
_baseOperator.Destroy();
}
}
}