From 3bc9f5509b9f36e934d1a16eeda31be9bb22ac10 Mon Sep 17 00:00:00 2001 From: Subv Date: Wed, 31 Dec 2014 21:43:31 -0500 Subject: Archives: Change the folder layout of some archives. This is to better represent the hardware layout, they are still aren't quite accurate, but this better and will help a bit when implementing the other archives like NAND-RO and NAND-RW --- src/core/file_sys/archive_extsavedata.cpp | 3 +-- src/core/hle/service/fs/archive.cpp | 2 +- src/core/hle/service/ptm_u.cpp | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) (limited to 'src/core') 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 { static std::string GetExtSaveDataPath(const std::string& mount_point, const Path& path) { std::vector vec_data = path.AsBinary(); const u32* data = reinterpret_cast(vec_data.data()); - u32 media_type = data[0]; u32 save_low = data[1]; u32 save_high = data[2]; - return Common::StringFromFormat("%s%s/%08X/%08X/", mount_point.c_str(), media_type == 0 ? "nand" : "sdmc", save_high, save_low); + return Common::StringFromFormat("%s%08X/%08X/", mount_point.c_str(), save_high, save_low); } Archive_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() { else LOG_ERROR(Service_FS, "Can't instantiate ExtSaveData archive with path %s", extsavedata_directory.c_str()); - std::string sharedextsavedata_directory = FileUtil::GetUserPath(D_EXTSAVEDATA); + std::string sharedextsavedata_directory = FileUtil::GetUserPath(D_SHAREDEXTSAVEDATA); auto sharedextsavedata_archive = Common::make_unique(sharedextsavedata_directory); if (sharedextsavedata_archive->Initialize()) 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() { Register(FunctionTable, ARRAY_SIZE(FunctionTable)); // Create the SharedExtSaveData archive 0xF000000B and the gamecoin.dat file // TODO(Subv): In the future we should use the FS service to query this archive - std::string extsavedata_directory = FileUtil::GetUserPath(D_EXTSAVEDATA); + std::string extsavedata_directory = FileUtil::GetUserPath(D_SHAREDEXTSAVEDATA); ptm_shared_extsavedata = Common::make_unique(extsavedata_directory); if (!ptm_shared_extsavedata->Initialize()) { LOG_CRITICAL(Service_PTM, "Could not initialize ExtSaveData archive for the PTM:U service"); -- cgit v1.2.3