summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorGravatar Subv2015-01-04 09:10:27 -0500
committerGravatar Subv2015-01-04 09:10:27 -0500
commit90dffe3fc16dd60166c53bafa2b3157737f39225 (patch)
treef2c7fa4e0405aea0107765810451d43ba8861ba5 /src/core
parentArchives: Changed the way paths are built for the archives. (diff)
downloadyuzu-90dffe3fc16dd60166c53bafa2b3157737f39225.tar.gz
yuzu-90dffe3fc16dd60166c53bafa2b3157737f39225.tar.xz
yuzu-90dffe3fc16dd60166c53bafa2b3157737f39225.zip
Archives: Make SYSTEM_ID and SDCARD_ID strings
Diffstat (limited to 'src/core')
-rw-r--r--src/core/file_sys/archive_extsavedata.cpp5
-rw-r--r--src/core/file_sys/archive_savedata.cpp3
-rw-r--r--src/core/file_sys/archive_savedatacheck.cpp2
-rw-r--r--src/core/file_sys/archive_systemsavedata.cpp2
-rw-r--r--src/core/hle/service/fs/archive.cpp4
-rw-r--r--src/core/hle/service/fs/archive.h4
6 files changed, 11 insertions, 9 deletions
diff --git a/src/core/file_sys/archive_extsavedata.cpp b/src/core/file_sys/archive_extsavedata.cpp
index 5de2aae43..50ca878e2 100644
--- a/src/core/file_sys/archive_extsavedata.cpp
+++ b/src/core/file_sys/archive_extsavedata.cpp
@@ -27,9 +27,10 @@ static std::string GetExtSaveDataPath(const std::string& mount_point, const Path
27 27
28static std::string GetExtDataContainerPath(const std::string& mount_point, bool shared) { 28static std::string GetExtDataContainerPath(const std::string& mount_point, bool shared) {
29 if (shared) 29 if (shared)
30 return Common::StringFromFormat("%sdata/%32x/extdata/", mount_point.c_str(), ID0); 30 return Common::StringFromFormat("%sdata/%s/extdata/", mount_point.c_str(), SYSTEM_ID.c_str());
31 31
32 return Common::StringFromFormat("%sNintendo 3DS/%32x/%32x/extdata/", mount_point.c_str(), ID0, ID1); 32 return Common::StringFromFormat("%sNintendo 3DS/%s/%s/extdata/", mount_point.c_str(),
33 SYSTEM_ID.c_str(), SDCARD_ID.c_str());
33} 34}
34 35
35Archive_ExtSaveData::Archive_ExtSaveData(const std::string& mount_location, bool shared) 36Archive_ExtSaveData::Archive_ExtSaveData(const std::string& mount_location, bool shared)
diff --git a/src/core/file_sys/archive_savedata.cpp b/src/core/file_sys/archive_savedata.cpp
index f189692fa..ecce7c105 100644
--- a/src/core/file_sys/archive_savedata.cpp
+++ b/src/core/file_sys/archive_savedata.cpp
@@ -18,7 +18,8 @@
18namespace FileSys { 18namespace FileSys {
19 19
20static std::string GetSaveDataContainerPath(const std::string& mount_point) { 20static std::string GetSaveDataContainerPath(const std::string& mount_point) {
21 return Common::StringFromFormat("%sNintendo 3DS/%32x/%32x/title/", mount_point.c_str(), ID0, ID1); 21 return Common::StringFromFormat("%sNintendo 3DS/%s/%s/title/", mount_point.c_str(),
22 SYSTEM_ID.c_str(), SDCARD_ID.c_str());
22} 23}
23 24
24static std::string GetSaveDataPath(const std::string& mount_point, u64 program_id) { 25static std::string GetSaveDataPath(const std::string& mount_point, u64 program_id) {
diff --git a/src/core/file_sys/archive_savedatacheck.cpp b/src/core/file_sys/archive_savedatacheck.cpp
index dcd563773..6f45d13dd 100644
--- a/src/core/file_sys/archive_savedatacheck.cpp
+++ b/src/core/file_sys/archive_savedatacheck.cpp
@@ -13,7 +13,7 @@
13namespace FileSys { 13namespace FileSys {
14 14
15static std::string GetSaveDataCheckContainerPath(const std::string& mount_point) { 15static std::string GetSaveDataCheckContainerPath(const std::string& mount_point) {
16 return Common::StringFromFormat("%stitle/", mount_point.c_str(), ID0); 16 return Common::StringFromFormat("%s%s/title", mount_point.c_str(), SYSTEM_ID.c_str());
17} 17}
18 18
19static std::string GetSaveDataCheckPath(const std::string& mount_point, u32 high, u32 low) { 19static std::string GetSaveDataCheckPath(const std::string& mount_point, u32 high, u32 low) {
diff --git a/src/core/file_sys/archive_systemsavedata.cpp b/src/core/file_sys/archive_systemsavedata.cpp
index 615f50e20..c2a5d641a 100644
--- a/src/core/file_sys/archive_systemsavedata.cpp
+++ b/src/core/file_sys/archive_systemsavedata.cpp
@@ -24,7 +24,7 @@ static std::string GetSystemSaveDataPath(const std::string& mount_point, u64 sav
24} 24}
25 25
26static std::string GetSystemSaveDataContainerPath(const std::string& mount_point) { 26static std::string GetSystemSaveDataContainerPath(const std::string& mount_point) {
27 return Common::StringFromFormat("%sdata/%32x/sysdata/", mount_point.c_str(), ID0); 27 return Common::StringFromFormat("%sdata/%s/sysdata/", mount_point.c_str(), SYSTEM_ID.c_str());
28} 28}
29 29
30Archive_SystemSaveData::Archive_SystemSaveData(const std::string& mount_point, u64 save_id) 30Archive_SystemSaveData::Archive_SystemSaveData(const std::string& mount_point, u64 save_id)
diff --git a/src/core/hle/service/fs/archive.cpp b/src/core/hle/service/fs/archive.cpp
index f332d6f1f..e627f1d64 100644
--- a/src/core/hle/service/fs/archive.cpp
+++ b/src/core/hle/service/fs/archive.cpp
@@ -36,8 +36,8 @@ namespace std {
36 }; 36 };
37} 37}
38 38
39const u32 SYSTEM_ID = 0; 39const std::string SYSTEM_ID = "00000000000000000000000000000000";
40const u32 SDCARD_ID = 0; 40const std::string SDCARD_ID = "00000000000000000000000000000000";
41 41
42namespace Service { 42namespace Service {
43namespace FS { 43namespace FS {
diff --git a/src/core/hle/service/fs/archive.h b/src/core/hle/service/fs/archive.h
index f91a3d5f4..b3f2134f2 100644
--- a/src/core/hle/service/fs/archive.h
+++ b/src/core/hle/service/fs/archive.h
@@ -11,9 +11,9 @@
11#include "core/hle/result.h" 11#include "core/hle/result.h"
12 12
13/// The unique system identifier hash, also known as ID0 13/// The unique system identifier hash, also known as ID0
14extern const u32 SYSTEM_ID; 14extern const std::string SYSTEM_ID;
15/// The scrambled SD card CID, also known as ID1 15/// The scrambled SD card CID, also known as ID1
16extern const u32 SDCARD_ID; 16extern const std::string SDCARD_ID;
17 17
18namespace Service { 18namespace Service {
19namespace FS { 19namespace FS {