From 7b0c92f621c75fbeddc98e5def4946a10df715c1 Mon Sep 17 00:00:00 2001 From: Collecting Date: Mon, 29 Dec 2025 01:10:51 +0000 Subject: [PATCH] feat(fs): Implement Global Custom Save Path Added a "Global Custom Save Path" configuration option in the Filesystem settings. Implemented a prioritized save-loading hierarchy: Global Path (if enabled) > Per-Game Custom Path > Default NAND. Introduced a non-destructive migration tool that allows users to consolidate their existing saves into the new global location. The migration tool specifically prioritizes per-game custom saves over NAND saves to ensure the most up-to-date data is preserved during consolidation. The migration process is copy-only; no data is deleted from the source directories, ensuring absolute user data safety. Maintained compatibility with the existing "Backup Saves to NAND" feature, ensuring saves continue to be mirrored internally if configured. Signed-off-by: Collecting --- src/citron/configuration/configure_filesystem.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/citron/configuration/configure_filesystem.h b/src/citron/configuration/configure_filesystem.h index 74b3e7d42..ffbd45bf0 100644 --- a/src/citron/configuration/configure_filesystem.h +++ b/src/citron/configuration/configure_filesystem.h @@ -35,12 +35,14 @@ private: void changeEvent(QEvent* event) override; void RetranslateUI(); void SetConfiguration(); - enum class DirectoryTarget { NAND, SD, Gamecard, Dump, Load }; + enum class DirectoryTarget { NAND, SD, Gamecard, Dump, Load, GlobalSave }; void SetDirectory(DirectoryTarget target, QLineEdit* edit); void ResetMetadata(); void UpdateEnabledControls(); void MigrateBackups(const QString& old_path, const QString& new_path); + void MigrateSavesToGlobal(const QString& new_global_path); + bool CopyDirRecursive(const QString& src, const QString& dest, QProgressDialog& progress, qint64& copied, qint64 total); std::unique_ptr ui; QProgressDialog* install_progress = nullptr;