diff options
| author | 2015-01-06 15:02:30 -0500 | |
|---|---|---|
| committer | 2015-01-06 15:02:30 -0500 | |
| commit | 5244ac0e9c784c402946616f913a8b4fe63af88c (patch) | |
| tree | bcf65d06fd74515c7697bd3add119e722eda667f | |
| parent | SaveDataCheck: Fixed a typo (diff) | |
| download | yuzu-5244ac0e9c784c402946616f913a8b4fe63af88c.tar.gz yuzu-5244ac0e9c784c402946616f913a8b4fe63af88c.tar.xz yuzu-5244ac0e9c784c402946616f913a8b4fe63af88c.zip | |
Archives: Addressed some comments
| -rw-r--r-- | src/core/file_sys/archive_extsavedata.cpp | 2 | ||||
| -rw-r--r-- | src/core/file_sys/archive_savedata.cpp | 12 | ||||
| -rw-r--r-- | src/core/file_sys/archive_savedatacheck.cpp | 8 | ||||
| -rw-r--r-- | src/core/file_sys/archive_sdmc.cpp | 4 | ||||
| -rw-r--r-- | src/core/hle/service/fs/archive.cpp | 4 |
5 files changed, 15 insertions, 15 deletions
diff --git a/src/core/file_sys/archive_extsavedata.cpp b/src/core/file_sys/archive_extsavedata.cpp index 50ca878e2..b8f8b2ed2 100644 --- a/src/core/file_sys/archive_extsavedata.cpp +++ b/src/core/file_sys/archive_extsavedata.cpp | |||
| @@ -34,7 +34,7 @@ static std::string GetExtDataContainerPath(const std::string& mount_point, bool | |||
| 34 | } | 34 | } |
| 35 | 35 | ||
| 36 | Archive_ExtSaveData::Archive_ExtSaveData(const std::string& mount_location, bool shared) | 36 | Archive_ExtSaveData::Archive_ExtSaveData(const std::string& mount_location, bool shared) |
| 37 | : DiskArchive(GetExtDataContainerPath(mount_location, shared)), concrete_mount_point(mount_point) { | 37 | : DiskArchive(GetExtDataContainerPath(mount_location, shared)), concrete_mount_point(mount_point) { |
| 38 | LOG_INFO(Service_FS, "Directory %s set as base for ExtSaveData.", mount_point.c_str()); | 38 | LOG_INFO(Service_FS, "Directory %s set as base for ExtSaveData.", mount_point.c_str()); |
| 39 | } | 39 | } |
| 40 | 40 | ||
diff --git a/src/core/file_sys/archive_savedata.cpp b/src/core/file_sys/archive_savedata.cpp index ecce7c105..3baee5294 100644 --- a/src/core/file_sys/archive_savedata.cpp +++ b/src/core/file_sys/archive_savedata.cpp | |||
| @@ -17,19 +17,19 @@ | |||
| 17 | 17 | ||
| 18 | namespace FileSys { | 18 | namespace FileSys { |
| 19 | 19 | ||
| 20 | static std::string GetSaveDataContainerPath(const std::string& mount_point) { | 20 | static std::string GetSaveDataContainerPath(const std::string& sdmc_directory) { |
| 21 | return Common::StringFromFormat("%sNintendo 3DS/%s/%s/title/", mount_point.c_str(), | 21 | return Common::StringFromFormat("%sNintendo 3DS/%s/%s/title/", sdmc_directory.c_str(), |
| 22 | SYSTEM_ID.c_str(), SDCARD_ID.c_str()); | 22 | SYSTEM_ID.c_str(), SDCARD_ID.c_str()); |
| 23 | } | 23 | } |
| 24 | 24 | ||
| 25 | static std::string GetSaveDataPath(const std::string& mount_point, u64 program_id) { | 25 | static std::string GetSaveDataPath(const std::string& mount_location, u64 program_id) { |
| 26 | u32 high = program_id >> 32; | 26 | u32 high = program_id >> 32; |
| 27 | u32 low = program_id & 0xFFFFFFFF; | 27 | u32 low = program_id & 0xFFFFFFFF; |
| 28 | return Common::StringFromFormat("%s%08x/%08x/data/00000001/", mount_point.c_str(), high, low); | 28 | return Common::StringFromFormat("%s%08x/%08x/data/00000001/", mount_location.c_str(), high, low); |
| 29 | } | 29 | } |
| 30 | 30 | ||
| 31 | Archive_SaveData::Archive_SaveData(const std::string& mount_point) | 31 | Archive_SaveData::Archive_SaveData(const std::string& sdmc_directory) |
| 32 | : DiskArchive(GetSaveDataContainerPath(mount_point)) { | 32 | : DiskArchive(GetSaveDataContainerPath(sdmc_directory)) { |
| 33 | LOG_INFO(Service_FS, "Directory %s set as SaveData.", this->mount_point.c_str()); | 33 | LOG_INFO(Service_FS, "Directory %s set as SaveData.", this->mount_point.c_str()); |
| 34 | } | 34 | } |
| 35 | 35 | ||
diff --git a/src/core/file_sys/archive_savedatacheck.cpp b/src/core/file_sys/archive_savedatacheck.cpp index 82449d1b7..a7a507536 100644 --- a/src/core/file_sys/archive_savedatacheck.cpp +++ b/src/core/file_sys/archive_savedatacheck.cpp | |||
| @@ -12,8 +12,8 @@ | |||
| 12 | 12 | ||
| 13 | namespace FileSys { | 13 | namespace FileSys { |
| 14 | 14 | ||
| 15 | static std::string GetSaveDataCheckContainerPath(const std::string& mount_point) { | 15 | static std::string GetSaveDataCheckContainerPath(const std::string& nand_directory) { |
| 16 | return Common::StringFromFormat("%s%s/title/", mount_point.c_str(), SYSTEM_ID.c_str()); | 16 | return Common::StringFromFormat("%s%s/title/", nand_directory.c_str(), SYSTEM_ID.c_str()); |
| 17 | } | 17 | } |
| 18 | 18 | ||
| 19 | static std::string GetSaveDataCheckPath(const std::string& mount_point, u32 high, u32 low) { | 19 | static std::string GetSaveDataCheckPath(const std::string& mount_point, u32 high, u32 low) { |
| @@ -21,8 +21,8 @@ static std::string GetSaveDataCheckPath(const std::string& mount_point, u32 high | |||
| 21 | mount_point.c_str(), high, low); | 21 | mount_point.c_str(), high, low); |
| 22 | } | 22 | } |
| 23 | 23 | ||
| 24 | Archive_SaveDataCheck::Archive_SaveDataCheck(const std::string& mount_loc) : | 24 | Archive_SaveDataCheck::Archive_SaveDataCheck(const std::string& nand_directory) : |
| 25 | mount_point(GetSaveDataCheckContainerPath(mount_loc)) { | 25 | mount_point(GetSaveDataCheckContainerPath(nand_directory)) { |
| 26 | } | 26 | } |
| 27 | 27 | ||
| 28 | ResultCode Archive_SaveDataCheck::Open(const Path& path) { | 28 | ResultCode Archive_SaveDataCheck::Open(const Path& path) { |
diff --git a/src/core/file_sys/archive_sdmc.cpp b/src/core/file_sys/archive_sdmc.cpp index 1c1c170b6..26b03e82f 100644 --- a/src/core/file_sys/archive_sdmc.cpp +++ b/src/core/file_sys/archive_sdmc.cpp | |||
| @@ -16,8 +16,8 @@ | |||
| 16 | 16 | ||
| 17 | namespace FileSys { | 17 | namespace FileSys { |
| 18 | 18 | ||
| 19 | Archive_SDMC::Archive_SDMC(const std::string& mount_point) : DiskArchive(mount_point) { | 19 | Archive_SDMC::Archive_SDMC(const std::string& sdmc_directory) : DiskArchive(sdmc_directory) { |
| 20 | LOG_INFO(Service_FS, "Directory %s set as SDMC.", mount_point.c_str()); | 20 | LOG_INFO(Service_FS, "Directory %s set as SDMC.", sdmc_directory.c_str()); |
| 21 | } | 21 | } |
| 22 | 22 | ||
| 23 | bool Archive_SDMC::Initialize() { | 23 | bool Archive_SDMC::Initialize() { |
diff --git a/src/core/hle/service/fs/archive.cpp b/src/core/hle/service/fs/archive.cpp index e627f1d64..0834b342a 100644 --- a/src/core/hle/service/fs/archive.cpp +++ b/src/core/hle/service/fs/archive.cpp | |||
| @@ -36,6 +36,7 @@ namespace std { | |||
| 36 | }; | 36 | }; |
| 37 | } | 37 | } |
| 38 | 38 | ||
| 39 | /// TODO(Subv): Confirm length of these strings | ||
| 39 | const std::string SYSTEM_ID = "00000000000000000000000000000000"; | 40 | const std::string SYSTEM_ID = "00000000000000000000000000000000"; |
| 40 | const std::string SDCARD_ID = "00000000000000000000000000000000"; | 41 | const std::string SDCARD_ID = "00000000000000000000000000000000"; |
| 41 | 42 | ||
| @@ -436,8 +437,7 @@ void ArchiveInit() { | |||
| 436 | next_handle = 1; | 437 | next_handle = 1; |
| 437 | 438 | ||
| 438 | // TODO(Link Mauve): Add the other archive types (see here for the known types: | 439 | // TODO(Link Mauve): Add the other archive types (see here for the known types: |
| 439 | // http://3dbrew.org/wiki/FS:OpenArchive#Archive_idcodes). Currently the only half-finished | 440 | // http://3dbrew.org/wiki/FS:OpenArchive#Archive_idcodes). |
| 440 | // archive type is SDMC, so it is the only one getting exposed. | ||
| 441 | 441 | ||
| 442 | std::string sdmc_directory = FileUtil::GetUserPath(D_SDMC_IDX); | 442 | std::string sdmc_directory = FileUtil::GetUserPath(D_SDMC_IDX); |
| 443 | std::string nand_directory = FileUtil::GetUserPath(D_NAND_IDX); | 443 | std::string nand_directory = FileUtil::GetUserPath(D_NAND_IDX); |