Preserve Checkpoint saves across clean install backup/restore.
Back up and restore sd:/switch/Checkpoint with CyberFoil and DBI settings during clean installs.
This commit is contained in:
@@ -69,6 +69,14 @@ int backup_user_data(void) {
|
||||
}
|
||||
}
|
||||
|
||||
// Backup Checkpoint (saves and app data) if installed
|
||||
if (path_exists(CHECKPOINT_DIR)) {
|
||||
res = folder_copy(CHECKPOINT_DIR, TEMP_BACKUP_PATH);
|
||||
if (res != FR_OK) {
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
return FR_OK;
|
||||
}
|
||||
|
||||
@@ -131,6 +139,14 @@ int restore_user_data(void) {
|
||||
}
|
||||
}
|
||||
|
||||
// Restore Checkpoint if backed up
|
||||
if (path_exists(TEMP_BACKUP_CHECKPOINT)) {
|
||||
res = folder_copy(TEMP_BACKUP_CHECKPOINT, "sd:/switch");
|
||||
if (res != FR_OK) {
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
return FR_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,13 +21,17 @@
|
||||
#define TEMP_BACKUP_CYBERFOIL_CONFIG TEMP_BACKUP_CYBERFOIL "/config.json"
|
||||
#define TEMP_BACKUP_CYBERFOIL_REMOTES TEMP_BACKUP_CYBERFOIL "/remotes"
|
||||
|
||||
/** Checkpoint save manager; preserved across clean install (full folder). */
|
||||
#define CHECKPOINT_DIR "sd:/switch/Checkpoint"
|
||||
#define TEMP_BACKUP_CHECKPOINT TEMP_BACKUP_PATH "/Checkpoint"
|
||||
|
||||
/** Live HorizonOC settings (Overclock tool). */
|
||||
#define HORIZON_OC_CONFIG_PATH "sd:/config/horizon-oc/config.ini"
|
||||
/** Scratch dir during OC-variant update only; removed after successful restore. */
|
||||
#define HORIZON_OC_UPDATE_BACKUP_DIR "sd:/.omninx_oc_update"
|
||||
#define HORIZON_OC_UPDATE_BACKUP_INI HORIZON_OC_UPDATE_BACKUP_DIR "/config.ini"
|
||||
|
||||
// Backup user data (CyberFoil, DBI dbi.config, prod.keys) before clean install
|
||||
// Backup user data (CyberFoil, Checkpoint, DBI dbi.config, prod.keys) before clean install
|
||||
int backup_user_data(void);
|
||||
|
||||
// Restore user data after clean install
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* OmniNX Installer - Deletion Lists for Clean Install Mode
|
||||
* Deletion policy aligned with NiklasCFW pack clean install (TegraExplorer script):
|
||||
* full sd:/atmosphere, bootloader/config subsets, sd:/switch, root + misc, then
|
||||
* post-restore paths (e.g. tinfoil db). CyberFoil/DBI/prod.keys backup is in backup.c.
|
||||
* post-restore paths (e.g. tinfoil db). CyberFoil/Checkpoint/DBI/prod.keys backup is in backup.c.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
// Clean mode: Backup user data
|
||||
int clean_mode_backup(void) {
|
||||
set_color(COLOR_CYAN);
|
||||
gfx_printf(" Sichere: CyberFoil, DBI (dbi.config), prod.keys\n");
|
||||
gfx_printf(" Sichere: CyberFoil, Checkpoint, DBI (dbi.config), prod.keys\n");
|
||||
set_color(COLOR_WHITE);
|
||||
int res = backup_user_data();
|
||||
if (res == FR_OK) {
|
||||
@@ -95,7 +95,7 @@ int clean_mode_wipe(void) {
|
||||
// Clean mode: Restore user data
|
||||
int clean_mode_restore(void) {
|
||||
set_color(COLOR_CYAN);
|
||||
gfx_printf(" Stelle wieder her: CyberFoil, DBI (dbi.config), prod.keys\n");
|
||||
gfx_printf(" Stelle wieder her: CyberFoil, Checkpoint, DBI (dbi.config), prod.keys\n");
|
||||
set_color(COLOR_WHITE);
|
||||
int res = restore_user_data();
|
||||
if (res == FR_OK) {
|
||||
|
||||
Reference in New Issue
Block a user