diff --git a/Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/IFileSystem.cs b/Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/IFileSystem.cs index 0b397ccf76..b907e17a9f 100644 --- a/Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/IFileSystem.cs +++ b/Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/IFileSystem.cs @@ -15,6 +15,11 @@ namespace Ryujinx.HLE.HOS.Services.Fs.FileSystemProxy _fileSystem = provider; } + public LibHac.Fs.IFileSystem GetBaseFileSystem() + { + return _fileSystem; + } + [Command(0)] // CreateFile(u32 createOption, u64 size, buffer, 0x19, 0x301> path) public ResultCode CreateFile(ServiceCtx context) diff --git a/Ryujinx.HLE/HOS/Services/Fs/IFileSystemProxy.cs b/Ryujinx.HLE/HOS/Services/Fs/IFileSystemProxy.cs index 43ae80aa08..d51308f3ba 100644 --- a/Ryujinx.HLE/HOS/Services/Fs/IFileSystemProxy.cs +++ b/Ryujinx.HLE/HOS/Services/Fs/IFileSystemProxy.cs @@ -513,5 +513,18 @@ namespace Ryujinx.HLE.HOS.Services.Fs return ResultCode.Success; } + + [Command(1200)] + public ResultCode OpenMultiCommitManager(ServiceCtx context) + { + Result result = _baseFileSystemProxy.OpenMultiCommitManager(out LibHac.FsService.IMultiCommitManager commitManager); + + if (result.IsSuccess()) + { + MakeObject(context, new IMultiCommitManager(commitManager)); + } + + return (ResultCode)result.Value; + } } } \ No newline at end of file diff --git a/Ryujinx.HLE/HOS/Services/Fs/IMultiCommitManager.cs b/Ryujinx.HLE/HOS/Services/Fs/IMultiCommitManager.cs new file mode 100644 index 0000000000..2625e8cd94 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Fs/IMultiCommitManager.cs @@ -0,0 +1,35 @@ +using LibHac; +using Ryujinx.HLE.HOS.Services.Fs.FileSystemProxy; + +namespace Ryujinx.HLE.HOS.Services.Fs +{ + class IMultiCommitManager : IpcService + { + private LibHac.FsService.IMultiCommitManager _baseCommitManager; + + public IMultiCommitManager(LibHac.FsService.IMultiCommitManager baseCommitManager) + { + _baseCommitManager = baseCommitManager; + } + + [Command(1)] + // Add(object) + public ResultCode Add(ServiceCtx context) + { + IFileSystem fileSystem = GetObject(context, 0); + + Result result = _baseCommitManager.Add(fileSystem.GetBaseFileSystem()); + + return (ResultCode)result.Value; + } + + [Command(2)] + // Commit() + public ResultCode Commit(ServiceCtx context) + { + Result result = _baseCommitManager.Commit(); + + return (ResultCode)result.Value; + } + } +} \ No newline at end of file diff --git a/Ryujinx.HLE/Ryujinx.HLE.csproj b/Ryujinx.HLE/Ryujinx.HLE.csproj index 7e0a9f3b34..521848e015 100644 --- a/Ryujinx.HLE/Ryujinx.HLE.csproj +++ b/Ryujinx.HLE/Ryujinx.HLE.csproj @@ -52,7 +52,7 @@ - +