diff options
| author | Alex Barney <thealexbarney@gmail.com> | 2022-11-23 10:32:35 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-23 18:32:35 +0100 |
| commit | 36f00985d3191ebd6ea909ddc4ed447ebdbf51b5 (patch) | |
| tree | 7d746bdf2e21ca76a90bfb03a24aae01ef4de3f6 /Ryujinx.HLE/HOS/Services | |
| parent | 748d87adccd0f331bd6d1163703040b6d62353b8 (diff) | |
Update to LibHac 0.17.0 (#3878)
* Update to LibHac 0.17.0
* Don't clear SD card saves when starting the emulator
This was an old workaround for errors that happened when a user's SD card encryption seed changed. SD card saves have been unencrypted for over a year, so we should be fine to remove the workaround.
Diffstat (limited to 'Ryujinx.HLE/HOS/Services')
| -rw-r--r-- | Ryujinx.HLE/HOS/Services/Fs/IDeviceOperator.cs | 5 | ||||
| -rw-r--r-- | Ryujinx.HLE/HOS/Services/Fs/IFileSystemProxy.cs | 16 |
2 files changed, 17 insertions, 4 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Fs/IDeviceOperator.cs b/Ryujinx.HLE/HOS/Services/Fs/IDeviceOperator.cs index 07ade0c6..f069fa3e 100644 --- a/Ryujinx.HLE/HOS/Services/Fs/IDeviceOperator.cs +++ b/Ryujinx.HLE/HOS/Services/Fs/IDeviceOperator.cs @@ -1,6 +1,7 @@ using LibHac; using LibHac.Common; -using LibHac.Fs; + +using GameCardHandle = System.UInt32; namespace Ryujinx.HLE.HOS.Services.Fs { @@ -41,7 +42,7 @@ namespace Ryujinx.HLE.HOS.Services.Fs { Result result = _baseOperator.Get.GetGameCardHandle(out GameCardHandle handle); - context.ResponseData.Write(handle.Value); + context.ResponseData.Write(handle); return (ResultCode)result.Value; } diff --git a/Ryujinx.HLE/HOS/Services/Fs/IFileSystemProxy.cs b/Ryujinx.HLE/HOS/Services/Fs/IFileSystemProxy.cs index 2ec45aa5..970aab95 100644 --- a/Ryujinx.HLE/HOS/Services/Fs/IFileSystemProxy.cs +++ b/Ryujinx.HLE/HOS/Services/Fs/IFileSystemProxy.cs @@ -19,6 +19,7 @@ using static Ryujinx.HLE.Utilities.StringUtils; using IFileSystem = LibHac.FsSrv.Sf.IFileSystem; using IStorage = LibHac.FsSrv.Sf.IStorage; using RightsId = LibHac.Fs.RightsId; +using GameCardHandle = System.UInt32; namespace Ryujinx.HLE.HOS.Services.Fs { @@ -239,7 +240,7 @@ namespace Ryujinx.HLE.HOS.Services.Fs // OpenGameCardStorage(u32 handle, u32 partitionId) -> object<nn::fssrv::sf::IStorage> public ResultCode OpenGameCardStorage(ServiceCtx context) { - GameCardHandle handle = new GameCardHandle(context.RequestData.ReadInt32()); + GameCardHandle handle = context.RequestData.ReadUInt32(); GameCardPartitionRaw partitionId = (GameCardPartitionRaw)context.RequestData.ReadInt32(); using var storage = new SharedRef<IStorage>(); @@ -255,7 +256,7 @@ namespace Ryujinx.HLE.HOS.Services.Fs // OpenGameCardFileSystem(u32 handle, u32 partitionId) -> object<nn::fssrv::sf::IFileSystem> public ResultCode OpenGameCardFileSystem(ServiceCtx context) { - GameCardHandle handle = new GameCardHandle(context.RequestData.ReadInt32()); + GameCardHandle handle = context.RequestData.ReadUInt32(); GameCardPartition partitionId = (GameCardPartition)context.RequestData.ReadInt32(); using var fileSystem = new SharedRef<IFileSystem>(); @@ -315,6 +316,17 @@ namespace Ryujinx.HLE.HOS.Services.Fs return (ResultCode)_baseFileSystemProxy.Get.CreateSaveDataFileSystemWithHashSalt(in attribute, in creationInfo, in metaCreateInfo, in hashSalt).Value; } + [CommandHipc(37)] // 14.0.0+ + // CreateSaveDataFileSystemWithCreationInfo2(buffer<nn::fs::SaveDataCreationInfo2, 25> creationInfo) -> () + public ResultCode CreateSaveDataFileSystemWithCreationInfo2(ServiceCtx context) + { + byte[] creationInfoBuffer = new byte[context.Request.SendBuff[0].Size]; + context.Memory.Read(context.Request.SendBuff[0].Position, creationInfoBuffer); + ref readonly SaveDataCreationInfo2 creationInfo = ref SpanHelpers.AsReadOnlyStruct<SaveDataCreationInfo2>(creationInfoBuffer); + + return (ResultCode)_baseFileSystemProxy.Get.CreateSaveDataFileSystemWithCreationInfo2(in creationInfo).Value; + } + [CommandHipc(51)] // OpenSaveDataFileSystem(u8 spaceId, nn::fs::SaveDataAttribute attribute) -> object<nn::fssrv::sf::IFileSystem> saveDataFs public ResultCode OpenSaveDataFileSystem(ServiceCtx context) |
