1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-12-03 20:52:00 +00:00

Update to LibHac 0.8.2 (#889)

* Update to LibHac 0.8.2

This brings support for temporary savedata, ignores case in key names when loading from a file, and prints the rights ID correctly when missing a title key.

* Auto-format IFileSystemProxy
This commit is contained in:
Alex Barney 2020-01-16 15:08:39 -07:00 committed by gdkchan
parent 892df335e6
commit c5f872c70a
3 changed files with 36 additions and 37 deletions

View file

@ -130,7 +130,7 @@ namespace Ryujinx.HLE.HOS.Services.Fs
public ResultCode CreateSaveDataFileSystem(ServiceCtx context)
{
SaveDataAttribute attribute = context.RequestData.ReadStruct<SaveDataAttribute>();
SaveDataCreateInfo createInfo = context.RequestData.ReadStruct<SaveDataCreateInfo>();
SaveDataCreationInfo creationInfo = context.RequestData.ReadStruct<SaveDataCreationInfo>();
SaveMetaCreateInfo metaCreateInfo = context.RequestData.ReadStruct<SaveMetaCreateInfo>();
// TODO: There's currently no program registry for FS to reference.
@ -140,14 +140,14 @@ namespace Ryujinx.HLE.HOS.Services.Fs
attribute.TitleId = new TitleId(context.Process.TitleId);
}
if (createInfo.OwnerId == TitleId.Zero)
if (creationInfo.OwnerId == TitleId.Zero)
{
createInfo.OwnerId = new TitleId(context.Process.TitleId);
creationInfo.OwnerId = new TitleId(context.Process.TitleId);
}
Logger.PrintInfo(LogClass.ServiceFs, $"Creating save with title ID {attribute.TitleId.Value:x16}");
Result result = _baseFileSystemProxy.CreateSaveDataFileSystem(ref attribute, ref createInfo, ref metaCreateInfo);
Result result = _baseFileSystemProxy.CreateSaveDataFileSystem(ref attribute, ref creationInfo, ref metaCreateInfo);
return (ResultCode)result.Value;
}
@ -156,9 +156,9 @@ namespace Ryujinx.HLE.HOS.Services.Fs
public ResultCode CreateSaveDataFileSystemBySystemSaveDataId(ServiceCtx context)
{
SaveDataAttribute attribute = context.RequestData.ReadStruct<SaveDataAttribute>();
SaveDataCreateInfo createInfo = context.RequestData.ReadStruct<SaveDataCreateInfo>();
SaveDataCreationInfo creationInfo = context.RequestData.ReadStruct<SaveDataCreationInfo>();
Result result = _baseFileSystemProxy.CreateSaveDataFileSystemBySystemSaveDataId(ref attribute, ref createInfo);
Result result = _baseFileSystemProxy.CreateSaveDataFileSystemBySystemSaveDataId(ref attribute, ref creationInfo);
return (ResultCode)result.Value;
}
@ -206,7 +206,7 @@ namespace Ryujinx.HLE.HOS.Services.Fs
public ResultCode CreateSaveDataFileSystemWithHashSalt(ServiceCtx context)
{
SaveDataAttribute attribute = context.RequestData.ReadStruct<SaveDataAttribute>();
SaveDataCreateInfo createInfo = context.RequestData.ReadStruct<SaveDataCreateInfo>();
SaveDataCreationInfo creationInfo = context.RequestData.ReadStruct<SaveDataCreationInfo>();
SaveMetaCreateInfo metaCreateInfo = context.RequestData.ReadStruct<SaveMetaCreateInfo>();
HashSalt hashSalt = context.RequestData.ReadStruct<HashSalt>();
@ -217,12 +217,12 @@ namespace Ryujinx.HLE.HOS.Services.Fs
attribute.TitleId = new TitleId(context.Process.TitleId);
}
if (createInfo.OwnerId == TitleId.Zero)
if (creationInfo.OwnerId == TitleId.Zero)
{
createInfo.OwnerId = new TitleId(context.Process.TitleId);
creationInfo.OwnerId = new TitleId(context.Process.TitleId);
}
Result result = _baseFileSystemProxy.CreateSaveDataFileSystemWithHashSalt(ref attribute, ref createInfo, ref metaCreateInfo, ref hashSalt);
Result result = _baseFileSystemProxy.CreateSaveDataFileSystemWithHashSalt(ref attribute, ref creationInfo, ref metaCreateInfo, ref hashSalt);
return (ResultCode)result.Value;
}

View file

@ -52,7 +52,7 @@
<ItemGroup>
<PackageReference Include="Concentus" Version="1.1.7" />
<PackageReference Include="LibHac" Version="0.7.0" />
<PackageReference Include="LibHac" Version="0.8.2" />
<PackageReference Include="TimeZoneConverter.Posix" Version="2.1.0" />
</ItemGroup>

View file

@ -3,7 +3,6 @@ using LibHac.Common;
using LibHac.Fs;
using LibHac.Fs.Shim;
using LibHac.FsSystem;
using LibHac.FsSystem.Save;
using LibHac.Ncm;
using Ryujinx.HLE.Utilities;
using System;
@ -131,7 +130,7 @@ namespace Ryujinx.Ui
{
SaveDataAttribute attribute = new SaveDataAttribute
{
Type = SaveDataType.SaveData,
Type = SaveDataType.Account,
UserId = userId,
TitleId = new TitleId(titleId)
};