savedata_factory: Add TemporaryStorage SaveDataSpaceId

Required for TemporaryStorage saves (in addition to SaveDataType)
This commit is contained in:
Zach Hilman 2018-10-16 10:20:04 -04:00
parent 74890cf2da
commit 9d4e6176eb

View file

@ -99,6 +99,9 @@ std::string SaveDataFactory::GetFullPath(SaveDataSpaceId space, SaveDataType typ
case SaveDataSpaceId::NandUser: case SaveDataSpaceId::NandUser:
out = "/user/"; out = "/user/";
break; break;
case SaveDataSpaceId::TemporaryStorage:
out = "/temp/";
break;
default: default:
ASSERT_MSG(false, "Unrecognized SaveDataSpaceId: {:02X}", static_cast<u8>(space)); ASSERT_MSG(false, "Unrecognized SaveDataSpaceId: {:02X}", static_cast<u8>(space));
} }
@ -111,7 +114,7 @@ std::string SaveDataFactory::GetFullPath(SaveDataSpaceId space, SaveDataType typ
return fmt::format("{}save/{: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); title_id);
case SaveDataType::TemporaryStorage: case SaveDataType::TemporaryStorage:
return fmt::format("{}temp/{:016X}/{:016X}{:016X}/{:016X}", out, 0, user_id[1], user_id[0], return fmt::format("{}{: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));