Merge pull request #1358 from DarkLordZach/temp-storage

savedata_factory: Add TemporaryStorage SaveDataType
This commit is contained in:
bunnei 2018-09-20 10:13:38 -04:00 committed by GitHub
commit 8fe9572271
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -85,10 +85,10 @@ std::string SaveDataFactory::GetFullPath(SaveDataSpaceId space, SaveDataType typ
switch (space) { switch (space) {
case SaveDataSpaceId::NandSystem: case SaveDataSpaceId::NandSystem:
out = "/system/save/"; out = "/system/";
break; break;
case SaveDataSpaceId::NandUser: case SaveDataSpaceId::NandUser:
out = "/user/save/"; out = "/user/";
break; break;
default: default:
ASSERT_MSG(false, "Unrecognized SaveDataSpaceId: {:02X}", static_cast<u8>(space)); ASSERT_MSG(false, "Unrecognized SaveDataSpaceId: {:02X}", static_cast<u8>(space));
@ -96,9 +96,12 @@ std::string SaveDataFactory::GetFullPath(SaveDataSpaceId space, SaveDataType typ
switch (type) { switch (type) {
case SaveDataType::SystemSaveData: case SaveDataType::SystemSaveData:
return fmt::format("{}{:016X}/{:016X}{:016X}", out, save_id, user_id[1], user_id[0]); return fmt::format("{}save/{:016X}/{:016X}{:016X}", out, save_id, user_id[1], user_id[0]);
case SaveDataType::SaveData: case SaveDataType::SaveData:
return fmt::format("{}{:016X}/{:016X}{:016X}/{:016X}", out, 0, user_id[1], user_id[0], return fmt::format("{}save/{:016X}/{:016X}{:016X}/{:016X}", out, 0, user_id[1], user_id[0],
title_id);
case SaveDataType::TemporaryStorage:
return fmt::format("{}temp/{:016X}/{:016X}{:016X}/{:016X}", out, 0, user_id[1], user_id[0],
title_id); title_id);
default: default:
ASSERT_MSG(false, "Unrecognized SaveDataType: {:02X}", static_cast<u8>(type)); ASSERT_MSG(false, "Unrecognized SaveDataType: {:02X}", static_cast<u8>(type));