summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/file_sys/archive_extsavedata.cpp3
-rw-r--r--src/core/hle/service/fs/archive.cpp2
-rw-r--r--src/core/hle/service/ptm_u.cpp2
3 files changed, 3 insertions, 4 deletions
diff --git a/src/core/file_sys/archive_extsavedata.cpp b/src/core/file_sys/archive_extsavedata.cpp
index 4759ef3ae..2f00bf067 100644
--- a/src/core/file_sys/archive_extsavedata.cpp
+++ b/src/core/file_sys/archive_extsavedata.cpp
@@ -19,10 +19,9 @@ namespace FileSys {
19static std::string GetExtSaveDataPath(const std::string& mount_point, const Path& path) { 19static std::string GetExtSaveDataPath(const std::string& mount_point, const Path& path) {
20 std::vector<u8> vec_data = path.AsBinary(); 20 std::vector<u8> vec_data = path.AsBinary();
21 const u32* data = reinterpret_cast<const u32*>(vec_data.data()); 21 const u32* data = reinterpret_cast<const u32*>(vec_data.data());
22 u32 media_type = data[0];
23 u32 save_low = data[1]; 22 u32 save_low = data[1];
24 u32 save_high = data[2]; 23 u32 save_high = data[2];
25 return Common::StringFromFormat("%s%s/%08X/%08X/", mount_point.c_str(), media_type == 0 ? "nand" : "sdmc", save_high, save_low); 24 return Common::StringFromFormat("%s%08X/%08X/", mount_point.c_str(), save_high, save_low);
26} 25}
27 26
28Archive_ExtSaveData::Archive_ExtSaveData(const std::string& mount_point) 27Archive_ExtSaveData::Archive_ExtSaveData(const std::string& mount_point)
diff --git a/src/core/hle/service/fs/archive.cpp b/src/core/hle/service/fs/archive.cpp
index f761c6ab9..56d53402f 100644
--- a/src/core/hle/service/fs/archive.cpp
+++ b/src/core/hle/service/fs/archive.cpp
@@ -455,7 +455,7 @@ void ArchiveInit() {
455 else 455 else
456 LOG_ERROR(Service_FS, "Can't instantiate ExtSaveData archive with path %s", extsavedata_directory.c_str()); 456 LOG_ERROR(Service_FS, "Can't instantiate ExtSaveData archive with path %s", extsavedata_directory.c_str());
457 457
458 std::string sharedextsavedata_directory = FileUtil::GetUserPath(D_EXTSAVEDATA); 458 std::string sharedextsavedata_directory = FileUtil::GetUserPath(D_SHAREDEXTSAVEDATA);
459 auto sharedextsavedata_archive = Common::make_unique<FileSys::Archive_ExtSaveData>(sharedextsavedata_directory); 459 auto sharedextsavedata_archive = Common::make_unique<FileSys::Archive_ExtSaveData>(sharedextsavedata_directory);
460 if (sharedextsavedata_archive->Initialize()) 460 if (sharedextsavedata_archive->Initialize())
461 CreateArchive(std::move(sharedextsavedata_archive), ArchiveIdCode::SharedExtSaveData); 461 CreateArchive(std::move(sharedextsavedata_archive), ArchiveIdCode::SharedExtSaveData);
diff --git a/src/core/hle/service/ptm_u.cpp b/src/core/hle/service/ptm_u.cpp
index 9cc700c46..c900c90f8 100644
--- a/src/core/hle/service/ptm_u.cpp
+++ b/src/core/hle/service/ptm_u.cpp
@@ -142,7 +142,7 @@ Interface::Interface() {
142 Register(FunctionTable, ARRAY_SIZE(FunctionTable)); 142 Register(FunctionTable, ARRAY_SIZE(FunctionTable));
143 // Create the SharedExtSaveData archive 0xF000000B and the gamecoin.dat file 143 // Create the SharedExtSaveData archive 0xF000000B and the gamecoin.dat file
144 // TODO(Subv): In the future we should use the FS service to query this archive 144 // TODO(Subv): In the future we should use the FS service to query this archive
145 std::string extsavedata_directory = FileUtil::GetUserPath(D_EXTSAVEDATA); 145 std::string extsavedata_directory = FileUtil::GetUserPath(D_SHAREDEXTSAVEDATA);
146 ptm_shared_extsavedata = Common::make_unique<FileSys::Archive_ExtSaveData>(extsavedata_directory); 146 ptm_shared_extsavedata = Common::make_unique<FileSys::Archive_ExtSaveData>(extsavedata_directory);
147 if (!ptm_shared_extsavedata->Initialize()) { 147 if (!ptm_shared_extsavedata->Initialize()) {
148 LOG_CRITICAL(Service_PTM, "Could not initialize ExtSaveData archive for the PTM:U service"); 148 LOG_CRITICAL(Service_PTM, "Could not initialize ExtSaveData archive for the PTM:U service");