From 1fabffaa3b2119d83ece881aea2f737173df4fa4 Mon Sep 17 00:00:00 2001 From: win2kgamer <47463859+win2kgamer@users.noreply.github.com> Date: Wed, 3 Dec 2025 17:49:54 -0600 Subject: [PATCH] Add config migration for the Aztech 1605/2316 codec type selection --- src/config.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/config.c b/src/config.c index 86dc95cca..197ed6b27 100644 --- a/src/config.c +++ b/src/config.c @@ -740,6 +740,25 @@ load_sound(void) } } + /* Correct Aztech codec selection in old configs so the OPTi 930 AD1848 type isn't selected */ + for (int i = 0; i < (sizeof(sound_card_current) / sizeof(sound_card_current[0])); i++) { + sprintf(temp, "Aztech Sound Galaxy Pro 16 AB (Washington) #%i", i + 1); + ini_section_t c = ini_find_section(config, temp); + if (c != NULL) { + if (ini_section_get_int(c, "codec", 1) == 2) + ini_section_set_int(c, "codec", 3); + } + } + for (int i = 0; i < (sizeof(sound_card_current) / sizeof(sound_card_current[0])); i++) { + sprintf(temp, "Aztech Sound Galaxy Nova 16 Extra (Clinton) #%i", i + 1); + ini_section_t c = ini_find_section(config, temp); + if (c != NULL) { + if (ini_section_get_int(c, "codec", 1) == 2) + ini_section_set_int(c, "codec", 3); + } + } + + memset(temp, '\0', sizeof(temp)); p = ini_section_get_string(cat, "sound_type", "float"); if (strlen(p) > 511)