mirror of
https://git.citron-emu.org/citron/emulator
synced 2026-01-30 14:33:29 +00:00
fs(feat): Add Backup Saves for Custom Save Paths
Signed-off-by: Collecting <collecting@noreply.localhost>
This commit is contained in:
@@ -431,7 +431,12 @@ std::shared_ptr<FileSys::SaveDataFactory> FileSystemController::CreateSaveDataFa
|
||||
if (!custom_path_str.empty() && Common::FS::IsDir(custom_path)) {
|
||||
LOG_INFO(Service_FS, "Using custom save path for program_id={:016X}: {}", program_id, custom_path_str);
|
||||
auto custom_save_directory = vfs->OpenDirectory(custom_path_str, rw_mode);
|
||||
return std::make_shared<FileSys::SaveDataFactory>(system, program_id, std::move(custom_save_directory));
|
||||
|
||||
// Fetch the default NAND directory to act as the backup location
|
||||
auto nand_directory = vfs->OpenDirectory(Common::FS::GetCitronPathString(CitronPath::NANDDir), rw_mode);
|
||||
|
||||
return std::make_shared<FileSys::SaveDataFactory>(
|
||||
system, program_id, std::move(custom_save_directory), std::move(nand_directory));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user