diff options
author | FearlessTobi <thm.frey@gmail.com> | 2024-02-19 15:36:20 +0100 |
---|---|---|
committer | FearlessTobi <thm.frey@gmail.com> | 2024-02-19 19:06:31 +0100 |
commit | 2b18957365d8f369626ec3b94277621df2fe1729 (patch) | |
tree | 16997564f581190e10eb8de9de552aa37bd856ff /src/core/file_sys/savedata_factory.h | |
parent | fsp: Migrate remaining interfaces to cmif serialization (diff) | |
download | yuzu-2b18957365d8f369626ec3b94277621df2fe1729.tar yuzu-2b18957365d8f369626ec3b94277621df2fe1729.tar.gz yuzu-2b18957365d8f369626ec3b94277621df2fe1729.tar.bz2 yuzu-2b18957365d8f369626ec3b94277621df2fe1729.tar.lz yuzu-2b18957365d8f369626ec3b94277621df2fe1729.tar.xz yuzu-2b18957365d8f369626ec3b94277621df2fe1729.tar.zst yuzu-2b18957365d8f369626ec3b94277621df2fe1729.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/file_sys/savedata_factory.h | 68 |
1 files changed, 1 insertions, 67 deletions
diff --git a/src/core/file_sys/savedata_factory.h b/src/core/file_sys/savedata_factory.h index 5ab7e4d32..15dd4ec7d 100644 --- a/src/core/file_sys/savedata_factory.h +++ b/src/core/file_sys/savedata_factory.h @@ -7,6 +7,7 @@ #include <string> #include "common/common_funcs.h" #include "common/common_types.h" +#include "core/file_sys/fs_save_data_types.h" #include "core/file_sys/vfs/vfs.h" #include "core/hle/result.h" @@ -16,73 +17,6 @@ class System; namespace FileSys { -enum class SaveDataSpaceId : u8 { - NandSystem = 0, - NandUser = 1, - SdCardSystem = 2, - TemporaryStorage = 3, - SdCardUser = 4, - ProperSystem = 100, - SafeMode = 101, -}; - -enum class SaveDataType : u8 { - SystemSaveData = 0, - SaveData = 1, - BcatDeliveryCacheStorage = 2, - DeviceSaveData = 3, - TemporaryStorage = 4, - CacheStorage = 5, - SystemBcat = 6, -}; - -enum class SaveDataRank : u8 { - Primary = 0, - Secondary = 1, -}; - -enum class SaveDataFlags : u32 { - None = (0 << 0), - KeepAfterResettingSystemSaveData = (1 << 0), - KeepAfterRefurbishment = (1 << 1), - KeepAfterResettingSystemSaveDataWithoutUserSaveData = (1 << 2), - NeedsSecureDelete = (1 << 3), -}; - -struct SaveDataAttribute { - u64 title_id; - u128 user_id; - u64 save_id; - SaveDataType type; - SaveDataRank rank; - u16 index; - INSERT_PADDING_BYTES_NOINIT(4); - u64 zero_1; - u64 zero_2; - u64 zero_3; - - std::string DebugInfo() const; -}; -static_assert(sizeof(SaveDataAttribute) == 0x40, "SaveDataAttribute has incorrect size."); - -struct SaveDataExtraData { - SaveDataAttribute attr; - u64 owner_id; - s64 timestamp; - SaveDataFlags flags; - INSERT_PADDING_BYTES_NOINIT(4); - s64 available_size; - s64 journal_size; - s64 commit_id; - std::array<u8, 0x190> unused; -}; -static_assert(sizeof(SaveDataExtraData) == 0x200, "SaveDataExtraData has incorrect size."); - -struct SaveDataSize { - u64 normal; - u64 journal; -}; - constexpr const char* GetSaveDataSizeFileName() { return ".yuzu_save_size"; } |