diff options
author | Alex Barney <thealexbarney@gmail.com> | 2020-08-08 07:02:06 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-08 16:02:06 +0200 |
commit | 8d59ad88b4d59ef6ad26b9a747dc871fd1f1007a (patch) | |
tree | 34f3b51c4d079e0c800c4d97d2168bf985677137 /Ryujinx.HLE/HOS/Services | |
parent | 8106bf65d9d33eb0a0b5afc2a21cdc9ebdf345cb (diff) |
Forward OpenSaveDataInfoReaderOnlyCacheStorage to OpenSaveDataInfoReaderWithFilter (#1449)
Diffstat (limited to 'Ryujinx.HLE/HOS/Services')
-rw-r--r-- | Ryujinx.HLE/HOS/Services/Fs/IFileSystemProxy.cs | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Fs/IFileSystemProxy.cs b/Ryujinx.HLE/HOS/Services/Fs/IFileSystemProxy.cs index a295b94d..42e778d6 100644 --- a/Ryujinx.HLE/HOS/Services/Fs/IFileSystemProxy.cs +++ b/Ryujinx.HLE/HOS/Services/Fs/IFileSystemProxy.cs @@ -321,6 +321,26 @@ namespace Ryujinx.HLE.HOS.Services.Fs return (ResultCode)result.Value; } + [Command(62)] + public ResultCode OpenSaveDataInfoReaderOnlyCacheStorage(ServiceCtx context) + { + SaveDataFilter filter = new SaveDataFilter(); + filter.SetSaveDataType(SaveDataType.Cache); + filter.SetProgramId(new TitleId(context.Process.TitleId)); + + // FS would query the User and SdCache space IDs to find where the existing cache is (if any). + // We always have the SD card inserted, so we can always use SdCache for now. + Result result = _baseFileSystemProxy.OpenSaveDataInfoReaderBySaveDataSpaceId( + out LibHac.FsService.ISaveDataInfoReader infoReader, SaveDataSpaceId.SdCache); + + if (result.IsSuccess()) + { + MakeObject(context, new ISaveDataInfoReader(infoReader)); + } + + return (ResultCode)result.Value; + } + [Command(67)] public ResultCode FindSaveDataWithFilter(ServiceCtx context) { @@ -390,7 +410,7 @@ namespace Ryujinx.HLE.HOS.Services.Fs Logger.Info?.Print(LogClass.Loader, $"Opened AddOnContent Data TitleID={titleId:X16}"); MakeObject(context, new FileSystemProxy.IStorage(aocStorage)); - + return ResultCode.Success; } |