Add IMultiCommitManager
This commit is contained in:
parent
2c27744b35
commit
8d243eeaa9
4 changed files with 54 additions and 1 deletions
|
@ -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<bytes<0x301>, 0x19, 0x301> path)
|
||||
public ResultCode CreateFile(ServiceCtx context)
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
35
Ryujinx.HLE/HOS/Services/Fs/IMultiCommitManager.cs
Normal file
35
Ryujinx.HLE/HOS/Services/Fs/IMultiCommitManager.cs
Normal file
|
@ -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<nn::fssrv::sf::IFileSystem>)
|
||||
public ResultCode Add(ServiceCtx context)
|
||||
{
|
||||
IFileSystem fileSystem = GetObject<IFileSystem>(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;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -52,7 +52,7 @@
|
|||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Concentus" Version="1.1.7" />
|
||||
<PackageReference Include="LibHac" Version="0.9.2--multi-commit.17" />
|
||||
<PackageReference Include="LibHac" Version="0.9.2--multi-commit.18" />
|
||||
<PackageReference Include="MsgPack.Cli" Version="1.0.1" />
|
||||
<PackageReference Include="TimeZoneConverter.Posix" Version="2.1.0" />
|
||||
</ItemGroup>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue