summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-04-05 03:10:47 +0200
committerLioncash <mathew1800@gmail.com>2019-04-05 17:03:53 +0200
commitd9ee58a3b5c3682d96713067e6cf2bf3ef72ec55 (patch)
tree3b4a74ff1f81e95c437519714bcb619fd2bbdbfd
parentMerge pull request #2330 from lioncash/pragma (diff)
downloadyuzu-d9ee58a3b5c3682d96713067e6cf2bf3ef72ec55.tar
yuzu-d9ee58a3b5c3682d96713067e6cf2bf3ef72ec55.tar.gz
yuzu-d9ee58a3b5c3682d96713067e6cf2bf3ef72ec55.tar.bz2
yuzu-d9ee58a3b5c3682d96713067e6cf2bf3ef72ec55.tar.lz
yuzu-d9ee58a3b5c3682d96713067e6cf2bf3ef72ec55.tar.xz
yuzu-d9ee58a3b5c3682d96713067e6cf2bf3ef72ec55.tar.zst
yuzu-d9ee58a3b5c3682d96713067e6cf2bf3ef72ec55.zip
-rw-r--r--src/core/file_sys/savedata_factory.cpp6
-rw-r--r--src/core/file_sys/savedata_factory.h9
-rw-r--r--src/core/hle/service/filesystem/fsp_srv.cpp4
3 files changed, 15 insertions, 4 deletions
diff --git a/src/core/file_sys/savedata_factory.cpp b/src/core/file_sys/savedata_factory.cpp
index 1913dc956..aba7249b5 100644
--- a/src/core/file_sys/savedata_factory.cpp
+++ b/src/core/file_sys/savedata_factory.cpp
@@ -16,8 +16,10 @@ namespace FileSys {
constexpr char SAVE_DATA_SIZE_FILENAME[] = ".yuzu_save_size";
std::string SaveDataDescriptor::DebugInfo() const {
- return fmt::format("[type={:02X}, title_id={:016X}, user_id={:016X}{:016X}, save_id={:016X}]",
- static_cast<u8>(type), title_id, user_id[1], user_id[0], save_id);
+ return fmt::format("[type={:02X}, title_id={:016X}, user_id={:016X}{:016X}, save_id={:016X}, "
+ "rank={}, index={}]",
+ static_cast<u8>(type), title_id, user_id[1], user_id[0], save_id,
+ static_cast<u8>(rank), index);
}
SaveDataFactory::SaveDataFactory(VirtualDir save_directory) : dir(std::move(save_directory)) {
diff --git a/src/core/file_sys/savedata_factory.h b/src/core/file_sys/savedata_factory.h
index 3a1caf292..77e93250a 100644
--- a/src/core/file_sys/savedata_factory.h
+++ b/src/core/file_sys/savedata_factory.h
@@ -32,12 +32,19 @@ enum class SaveDataType : u8 {
CacheStorage = 5,
};
+enum class SaveDataRank : u8 {
+ Primary,
+ Secondary,
+};
+
struct SaveDataDescriptor {
u64_le title_id;
u128 user_id;
u64_le save_id;
SaveDataType type;
- INSERT_PADDING_BYTES(7);
+ SaveDataRank rank;
+ u16_le index;
+ INSERT_PADDING_BYTES(4);
u64_le zero_1;
u64_le zero_2;
u64_le zero_3;
diff --git a/src/core/hle/service/filesystem/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp_srv.cpp
index f03fb629c..06547e063 100644
--- a/src/core/hle/service/filesystem/fsp_srv.cpp
+++ b/src/core/hle/service/filesystem/fsp_srv.cpp
@@ -616,7 +616,9 @@ private:
u64_le save_id;
u64_le title_id;
u64_le save_image_size;
- INSERT_PADDING_BYTES(0x28);
+ u16_le index;
+ FileSys::SaveDataRank rank;
+ INSERT_PADDING_BYTES(0x25);
};
static_assert(sizeof(SaveDataInfo) == 0x60, "SaveDataInfo has incorrect size.");