yuzu-emu
/
yuzu
Archived
1
0
Fork 0

Archives: Addressed some comments

This commit is contained in:
Subv 2015-01-06 15:02:30 -05:00
parent 123a76c9c8
commit 5244ac0e9c
5 changed files with 15 additions and 15 deletions

View File

@ -34,7 +34,7 @@ static std::string GetExtDataContainerPath(const std::string& mount_point, bool
}
Archive_ExtSaveData::Archive_ExtSaveData(const std::string& mount_location, bool shared)
: DiskArchive(GetExtDataContainerPath(mount_location, shared)), concrete_mount_point(mount_point) {
: DiskArchive(GetExtDataContainerPath(mount_location, shared)), concrete_mount_point(mount_point) {
LOG_INFO(Service_FS, "Directory %s set as base for ExtSaveData.", mount_point.c_str());
}

View File

@ -17,19 +17,19 @@
namespace FileSys {
static std::string GetSaveDataContainerPath(const std::string& mount_point) {
return Common::StringFromFormat("%sNintendo 3DS/%s/%s/title/", mount_point.c_str(),
static std::string GetSaveDataContainerPath(const std::string& sdmc_directory) {
return Common::StringFromFormat("%sNintendo 3DS/%s/%s/title/", sdmc_directory.c_str(),
SYSTEM_ID.c_str(), SDCARD_ID.c_str());
}
static std::string GetSaveDataPath(const std::string& mount_point, u64 program_id) {
static std::string GetSaveDataPath(const std::string& mount_location, u64 program_id) {
u32 high = program_id >> 32;
u32 low = program_id & 0xFFFFFFFF;
return Common::StringFromFormat("%s%08x/%08x/data/00000001/", mount_point.c_str(), high, low);
return Common::StringFromFormat("%s%08x/%08x/data/00000001/", mount_location.c_str(), high, low);
}
Archive_SaveData::Archive_SaveData(const std::string& mount_point)
: DiskArchive(GetSaveDataContainerPath(mount_point)) {
Archive_SaveData::Archive_SaveData(const std::string& sdmc_directory)
: DiskArchive(GetSaveDataContainerPath(sdmc_directory)) {
LOG_INFO(Service_FS, "Directory %s set as SaveData.", this->mount_point.c_str());
}

View File

@ -12,8 +12,8 @@
namespace FileSys {
static std::string GetSaveDataCheckContainerPath(const std::string& mount_point) {
return Common::StringFromFormat("%s%s/title/", mount_point.c_str(), SYSTEM_ID.c_str());
static std::string GetSaveDataCheckContainerPath(const std::string& nand_directory) {
return Common::StringFromFormat("%s%s/title/", nand_directory.c_str(), SYSTEM_ID.c_str());
}
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
mount_point.c_str(), high, low);
}
Archive_SaveDataCheck::Archive_SaveDataCheck(const std::string& mount_loc) :
mount_point(GetSaveDataCheckContainerPath(mount_loc)) {
Archive_SaveDataCheck::Archive_SaveDataCheck(const std::string& nand_directory) :
mount_point(GetSaveDataCheckContainerPath(nand_directory)) {
}
ResultCode Archive_SaveDataCheck::Open(const Path& path) {

View File

@ -16,8 +16,8 @@
namespace FileSys {
Archive_SDMC::Archive_SDMC(const std::string& mount_point) : DiskArchive(mount_point) {
LOG_INFO(Service_FS, "Directory %s set as SDMC.", mount_point.c_str());
Archive_SDMC::Archive_SDMC(const std::string& sdmc_directory) : DiskArchive(sdmc_directory) {
LOG_INFO(Service_FS, "Directory %s set as SDMC.", sdmc_directory.c_str());
}
bool Archive_SDMC::Initialize() {

View File

@ -36,6 +36,7 @@ namespace std {
};
}
/// TODO(Subv): Confirm length of these strings
const std::string SYSTEM_ID = "00000000000000000000000000000000";
const std::string SDCARD_ID = "00000000000000000000000000000000";
@ -436,8 +437,7 @@ void ArchiveInit() {
next_handle = 1;
// TODO(Link Mauve): Add the other archive types (see here for the known types:
// http://3dbrew.org/wiki/FS:OpenArchive#Archive_idcodes). Currently the only half-finished
// archive type is SDMC, so it is the only one getting exposed.
// http://3dbrew.org/wiki/FS:OpenArchive#Archive_idcodes).
std::string sdmc_directory = FileUtil::GetUserPath(D_SDMC_IDX);
std::string nand_directory = FileUtil::GetUserPath(D_NAND_IDX);