Update to LibHac 0.13.1 (#2475)
* Update to LibHac 0.13.1 * Recreate directories for indexed saves if they're missing on emulator start
This commit is contained in:
parent
3977d1f72b
commit
dadc0e59da
32 changed files with 1869 additions and 584 deletions
|
@ -3,11 +3,11 @@ using LibHac.FsSrv;
|
|||
|
||||
namespace Ryujinx.HLE.HOS.Services.Fs
|
||||
{
|
||||
class IDeviceOperator : IpcService
|
||||
class IDeviceOperator : DisposableIpcService
|
||||
{
|
||||
private LibHac.FsSrv.IDeviceOperator _baseOperator;
|
||||
private ReferenceCountedDisposable<LibHac.FsSrv.Sf.IDeviceOperator> _baseOperator;
|
||||
|
||||
public IDeviceOperator(LibHac.FsSrv.IDeviceOperator baseOperator)
|
||||
public IDeviceOperator(ReferenceCountedDisposable<LibHac.FsSrv.Sf.IDeviceOperator> baseOperator)
|
||||
{
|
||||
_baseOperator = baseOperator;
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ namespace Ryujinx.HLE.HOS.Services.Fs
|
|||
// IsSdCardInserted() -> b8 is_inserted
|
||||
public ResultCode IsSdCardInserted(ServiceCtx context)
|
||||
{
|
||||
Result result = _baseOperator.IsSdCardInserted(out bool isInserted);
|
||||
Result result = _baseOperator.Target.IsSdCardInserted(out bool isInserted);
|
||||
|
||||
context.ResponseData.Write(isInserted);
|
||||
|
||||
|
@ -27,7 +27,7 @@ namespace Ryujinx.HLE.HOS.Services.Fs
|
|||
// IsGameCardInserted() -> b8 is_inserted
|
||||
public ResultCode IsGameCardInserted(ServiceCtx context)
|
||||
{
|
||||
Result result = _baseOperator.IsGameCardInserted(out bool isInserted);
|
||||
Result result = _baseOperator.Target.IsGameCardInserted(out bool isInserted);
|
||||
|
||||
context.ResponseData.Write(isInserted);
|
||||
|
||||
|
@ -38,11 +38,19 @@ namespace Ryujinx.HLE.HOS.Services.Fs
|
|||
// GetGameCardHandle() -> u32 gamecard_handle
|
||||
public ResultCode GetGameCardHandle(ServiceCtx context)
|
||||
{
|
||||
Result result = _baseOperator.GetGameCardHandle(out GameCardHandle handle);
|
||||
Result result = _baseOperator.Target.GetGameCardHandle(out GameCardHandle handle);
|
||||
|
||||
context.ResponseData.Write(handle.Value);
|
||||
|
||||
return (ResultCode)result.Value;
|
||||
}
|
||||
|
||||
protected override void Dispose(bool isDisposing)
|
||||
{
|
||||
if (isDisposing)
|
||||
{
|
||||
_baseOperator?.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue