mirror of
https://github.com/86Box/86Box.git
synced 2026-02-22 09:35:32 -07:00
Add config migration for the Aztech 1605/2316 codec type selection
This commit is contained in:
19
src/config.c
19
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)
|
||||
|
||||
Reference in New Issue
Block a user