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:
Alex Barney 2021-08-12 14:56:24 -07:00 committed by GitHub
parent 3977d1f72b
commit dadc0e59da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 1869 additions and 584 deletions

View file

@ -3,11 +3,11 @@ using Ryujinx.HLE.HOS.Services.Fs.FileSystemProxy;
namespace Ryujinx.HLE.HOS.Services.Fs
{
class IMultiCommitManager : IpcService // 6.0.0+
class IMultiCommitManager : DisposableIpcService // 6.0.0+
{
private LibHac.FsSrv.IMultiCommitManager _baseCommitManager;
private ReferenceCountedDisposable<LibHac.FsSrv.Sf.IMultiCommitManager> _baseCommitManager;
public IMultiCommitManager(LibHac.FsSrv.IMultiCommitManager baseCommitManager)
public IMultiCommitManager(ReferenceCountedDisposable<LibHac.FsSrv.Sf.IMultiCommitManager> baseCommitManager)
{
_baseCommitManager = baseCommitManager;
}
@ -18,7 +18,7 @@ namespace Ryujinx.HLE.HOS.Services.Fs
{
IFileSystem fileSystem = GetObject<IFileSystem>(context, 0);
Result result = _baseCommitManager.Add(fileSystem.GetBaseFileSystem());
Result result = _baseCommitManager.Target.Add(fileSystem.GetBaseFileSystem());
return (ResultCode)result.Value;
}
@ -27,9 +27,17 @@ namespace Ryujinx.HLE.HOS.Services.Fs
// Commit()
public ResultCode Commit(ServiceCtx context)
{
Result result = _baseCommitManager.Commit();
Result result = _baseCommitManager.Target.Commit();
return (ResultCode)result.Value;
}
protected override void Dispose(bool isDisposing)
{
if (isDisposing)
{
_baseCommitManager?.Dispose();
}
}
}
}