Compare commits

..

3 Commits

Author SHA1 Message Date
405bed7291 Version bump to 1.0.2
All checks were successful
Build / Build (push) Successful in 23s
2026-07-21 13:52:23 +02:00
3a2fb4fb2e Migrate legacy ram_config.ini into config.ini on extras post-copy.
Port [Ram] from ram_config.ini when present, preserve existing HekateAms settings, then remove the legacy file.
2026-07-21 13:50:33 +02:00
eb18bf8c72 Preserve Checkpoint across update installs.
All checks were successful
Build / Build (push) Successful in 13s
Skip deleting sd:/switch/checkpoint so user saves under saves/ are not wiped.
2026-07-17 21:37:20 +02:00
3 changed files with 27 additions and 12 deletions

View File

@@ -1 +1 @@
1.0.1
1.0.2

View File

@@ -136,7 +136,6 @@ static const char* switch_dirs_to_delete[] = {
"sd:/switch/AtmoXL-Titel-Installer",
"sd:/switch/Benchmark-Toolbox",
"sd:/switch/breeze",
"sd:/switch/checkpoint",
"sd:/switch/cheats-updater",
"sd:/switch/chiaki",
"sd:/switch/ChoiDujourNX",

View File

@@ -726,18 +726,13 @@ static bool install_config_read_key_bool(const char *path, const char *section,
return found;
}
/* Valid [Ram] 8gb=0|1 in config.ini (or legacy ram_config.ini) → silent; else menu. */
/* Valid [Ram] 8gb=0|1 in config.ini → silent; else menu. */
static int install_config_read_ram(bool *use_8gb)
{
static const char *paths[] = { INSTALL_CONFIG_INI, INSTALL_CONFIG_INI_LEGACY, NULL };
for (int i = 0; paths[i]; i++) {
if (!install_path_exists(paths[i]))
continue;
if (install_config_read_key_bool(paths[i], "Ram", "8gb", use_8gb))
return INSTALL_CONFIG_OK;
}
if (!install_path_exists(INSTALL_CONFIG_INI))
return INSTALL_CONFIG_NEED_MENU;
if (install_config_read_key_bool(INSTALL_CONFIG_INI, "Ram", "8gb", use_8gb))
return INSTALL_CONFIG_OK;
return INSTALL_CONFIG_NEED_MENU;
}
@@ -777,6 +772,25 @@ static int install_config_write_extras(bool need_ram, bool use_8gb, bool need_he
return FR_OK;
}
/* If legacy ram_config.ini exists: port [Ram] into config.ini, then remove legacy. */
static void install_config_migrate_legacy_ram(void)
{
if (!install_path_exists(INSTALL_CONFIG_INI_LEGACY))
return;
bool use_8gb = false;
bool have_ram = install_config_read_key_bool(INSTALL_CONFIG_INI_LEGACY, "Ram", "8gb", &use_8gb);
if (have_ram) {
bool use_pro = false;
bool have_pro = install_path_exists(INSTALL_CONFIG_INI) &&
install_config_read_key_bool(INSTALL_CONFIG_INI, "HekateAms", "pro", &use_pro);
install_config_write_extras(true, use_8gb, have_pro, use_pro);
}
unlink_ignore_err(INSTALL_CONFIG_INI_LEGACY);
}
#define INSTALL_PRESERVE_INI "sd:/config/omninx/preserve.ini"
#define INSTALL_PRESERVE_MAX 96
#define INSTALL_PRESERVE_PATH_BYTES 224
@@ -1250,6 +1264,8 @@ static void install_apply_8gb_payload(bool use_8gb, bool use_pro)
/* After pack copy: RAM + Hekate/AMS menus from extras; choices stored in config.ini. */
static void install_extras_post_copy(void)
{
install_config_migrate_legacy_ram();
if (!install_extras_post_copy_needed())
return;