diff options
| author | Alex Barney <thealexbarney@gmail.com> | 2020-01-05 04:49:44 -0700 |
|---|---|---|
| committer | Thog <me@thog.eu> | 2020-01-05 12:49:44 +0100 |
| commit | 63b24b4af2804f173764c98586a19c39db04ad4d (patch) | |
| tree | 7994f00e4bc06edc430004a7caa1bdf0231b2668 /Ryujinx.HLE/HOS/Services/Fs/ISaveDataInfoReader.cs | |
| parent | e0e12b1672e49ab5810bf88bf8274990605ed67a (diff) | |
Rename "RyuFs" directory to "Ryujinx" and use the same savedata system the Switch uses (#801)
* Use savedata FS commands from LibHac
* Add EnsureSaveData. Use ApplicationControlProperty struct
* Add a function to migrate to the new directory layout
* LibHac update
* Change backup structure
* Don't create UI files in the save path
* Update RyuFs paths
* Add GetProgramIndexForAccessLog
Ryujinx only runs one program at a time, so always return values reflecting that
* Load control NCA when loading from an NSP
* Skip over UI stats when exiting
* Set TitleName and TitleId in more cases. Fix TitleID naming style
* Completely comment out GUI play stats code
* rebase
* Update LibHac
* Update LibHac
* Revert UI changes
* Do migration automatically at startup
* Rename RyuFs directory to Ryujinx
* Update RyuFs text
* Store savedata paths in the GUI
* Make "Open Save Directory" work
* Use a dummy NACP in EnsureSaveData if one is not loaded
* Remove manual migration button
* Respond to feedback
* Don't read the installer config to get a version string
* Delete nuget.config
* Exclude 'sdcard' and 'bis' during migration
Co-authored-by: Thog <thog@protonmail.com>
Diffstat (limited to 'Ryujinx.HLE/HOS/Services/Fs/ISaveDataInfoReader.cs')
| -rw-r--r-- | Ryujinx.HLE/HOS/Services/Fs/ISaveDataInfoReader.cs | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Fs/ISaveDataInfoReader.cs b/Ryujinx.HLE/HOS/Services/Fs/ISaveDataInfoReader.cs new file mode 100644 index 00000000..3d5ae8e2 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Fs/ISaveDataInfoReader.cs @@ -0,0 +1,31 @@ +using LibHac; + +namespace Ryujinx.HLE.HOS.Services.Fs +{ + class ISaveDataInfoReader : IpcService + { + private LibHac.FsService.ISaveDataInfoReader _baseReader; + + public ISaveDataInfoReader(LibHac.FsService.ISaveDataInfoReader baseReader) + { + _baseReader = baseReader; + } + + [Command(0)] + // ReadSaveDataInfo() -> (u64, buffer<unknown, 6>) + public ResultCode ReadSaveDataInfo(ServiceCtx context) + { + long bufferPosition = context.Request.ReceiveBuff[0].Position; + long bufferLen = context.Request.ReceiveBuff[0].Size; + + byte[] infoBuffer = new byte[bufferLen]; + + Result result = _baseReader.ReadSaveDataInfo(out long readCount, infoBuffer); + + context.Memory.WriteBytes(bufferPosition, infoBuffer); + context.ResponseData.Write(readCount); + + return (ResultCode)result.Value; + } + } +} |
