From 81e4d95fc79e7a2018b6f9054d950b8f134327a6 Mon Sep 17 00:00:00 2001 From: OBattler Date: Tue, 16 Sep 2025 22:14:52 +0200 Subject: [PATCH] Config: Fix HDC migration to avoid "internal" devices on hard disk controllers above the first and also remove them from the config on save. --- src/config.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config.c b/src/config.c index d3bc0c2de..53d00a6bf 100644 --- a/src/config.c +++ b/src/config.c @@ -1034,7 +1034,7 @@ load_storage_controllers(void) if (!hdc_current[j]) { if (!legacy_cards[i]) { if (!p) { - hdc_current[j] = hdc_get_from_internal_name("internal"); + hdc_current[j] = hdc_get_from_internal_name((j == 0) ? "internal" : "none"); } else if (!strcmp(p, "xtide_plus")) { hdc_current[j] = hdc_get_from_internal_name("xtide"); sprintf(temp, "PC/XT XTIDE #%i", j + 1); @@ -3063,7 +3063,7 @@ save_storage_controllers(void) else def_hdc = "none"; - if (!strcmp(hdc_get_internal_name(hdc_current[c]), def_hdc)) + if (!strcmp(hdc_get_internal_name(hdc_current[c]), def_hdc) || ((c > 0) && (hdc_current[c] == 1))) ini_section_delete_var(cat, temp); else ini_section_set_string(cat, temp,