Added ability to change save data path (#2199)

* added ability to change save data path

* get default save data path from fs

* add copyright

* formatting
This commit is contained in:
f3d209 2025-01-22 10:10:35 +00:00 committed by GitHub
parent 78ae9613c5
commit adbff4056f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 132 additions and 53 deletions

View file

@ -47,15 +47,13 @@ namespace Libraries::SaveData {
std::filesystem::path SaveInstance::MakeTitleSavePath(OrbisUserServiceUserId user_id,
std::string_view game_serial) {
return Common::FS::GetUserPath(Common::FS::PathType::SaveDataDir) / std::to_string(user_id) /
game_serial;
return Config::GetSaveDataPath() / std::to_string(user_id) / game_serial;
}
std::filesystem::path SaveInstance::MakeDirSavePath(OrbisUserServiceUserId user_id,
std::string_view game_serial,
std::string_view dir_name) {
return Common::FS::GetUserPath(Common::FS::PathType::SaveDataDir) / std::to_string(user_id) /
game_serial / dir_name;
return Config::GetSaveDataPath() / std::to_string(user_id) / game_serial / dir_name;
}
uint64_t SaveInstance::GetMaxBlockFromSFO(const PSF& psf) {