Ensure SaveDataSharedFileStorage classes are updated for 13.1.0

- SaveDataOpenTypeSetFileStorage
- SaveDataSharedFileStorage
- SaveDataFileStorageHolder
This commit is contained in:
Alex Barney 2022-01-15 13:28:24 -07:00
parent d116903892
commit 7f1035374d

View file

@ -14,7 +14,7 @@ namespace LibHac.FsSrv;
/// <summary> /// <summary>
/// Contains global functions for SaveDataSharedFileStorage. /// Contains global functions for SaveDataSharedFileStorage.
/// </summary> /// </summary>
/// <remarks>Based on FS 12.1.0 (nnSdk 12.3.1).</remarks> /// <remarks>Based on FS 13.1.0 (nnSdk 13.4.0)</remarks>
public static class SaveDataSharedFileStorageGlobalMethods public static class SaveDataSharedFileStorageGlobalMethods
{ {
public static Result OpenSaveDataStorage(this FileSystemServer fsSrv, public static Result OpenSaveDataStorage(this FileSystemServer fsSrv,
@ -45,7 +45,7 @@ internal struct SaveDataSharedFileStorageGlobals
/// This class keeps track of which types of save data file systems have been opened from the save data file. /// This class keeps track of which types of save data file systems have been opened from the save data file.
/// Only one of each file system type can be opened at the same time. /// Only one of each file system type can be opened at the same time.
/// </summary> /// </summary>
/// <remarks>Based on FS 12.1.0 (nnSdk 12.3.1).</remarks> /// <remarks>Based on FS 13.1.0 (nnSdk 13.4.0)</remarks>
public class SaveDataOpenTypeSetFileStorage : FileStorageBasedFileSystem public class SaveDataOpenTypeSetFileStorage : FileStorageBasedFileSystem
{ {
public enum OpenType public enum OpenType
@ -71,7 +71,7 @@ public class SaveDataOpenTypeSetFileStorage : FileStorageBasedFileSystem
_fsServer = fsServer; _fsServer = fsServer;
_spaceId = spaceId; _spaceId = spaceId;
_saveDataId = saveDataId; _saveDataId = saveDataId;
_mutex.Initialize(); _mutex = new SdkMutexType();
} }
public Result Initialize(ref SharedRef<IFileSystem> baseFileSystem, in Path path, OpenMode mode, OpenType type) public Result Initialize(ref SharedRef<IFileSystem> baseFileSystem, in Path path, OpenMode mode, OpenType type)
@ -161,7 +161,7 @@ public class SaveDataOpenTypeSetFileStorage : FileStorageBasedFileSystem
/// Once an internal file system is opened, it will be considered valid until the save data image is /// Once an internal file system is opened, it will be considered valid until the save data image is
/// written to via the normal file system, at which point any accesses via the internal file system will /// written to via the normal file system, at which point any accesses via the internal file system will
/// return <see cref="ResultFs.SaveDataPorterInvalidated"/> /// return <see cref="ResultFs.SaveDataPorterInvalidated"/>
/// <para>Based on FS 12.1.0 (nnSdk 12.3.1).</para> /// <para>Based on FS 13.1.0 (nnSdk 13.4.0)</para>
/// </remarks> /// </remarks>
public class SaveDataSharedFileStorage : IStorage public class SaveDataSharedFileStorage : IStorage
{ {
@ -268,7 +268,7 @@ public class SaveDataSharedFileStorage : IStorage
/// <summary> /// <summary>
/// Holds references to any open shared save data image files. /// Holds references to any open shared save data image files.
/// </summary> /// </summary>
/// <remarks>Based on FS 12.1.0 (nnSdk 12.3.1).</remarks> /// <remarks>Based on FS 13.1.0 (nnSdk 13.4.0)</remarks>
public class SaveDataFileStorageHolder public class SaveDataFileStorageHolder
{ {
[NonCopyable] [NonCopyable]