summaryrefslogtreecommitdiff
path: root/src/setup
diff options
context:
space:
mode:
Diffstat (limited to 'src/setup')
-rw-r--r--src/setup/sound.c48
1 files changed, 22 insertions, 26 deletions
diff --git a/src/setup/sound.c b/src/setup/sound.c
index bc2bdf33..092a5dd8 100644
--- a/src/setup/sound.c
+++ b/src/setup/sound.c
@@ -146,40 +146,36 @@ static void UpdateExtraTable(TXT_UNCAST_ARG(widget),
{
TXT_CAST_ARG(txt_table_t, extra_table);
- // Rebuild the GUS table. Start by emptying it, then only add the
- // GUS control widget if we are in GUS music mode.
-
- if (snd_musicmode == MUSICMODE_OPL)
+ switch (snd_musicmode)
{
+ case MUSICMODE_OPL:
TXT_InitTable(extra_table, 2);
TXT_SetColumnWidths(extra_table, 19, 4);
TXT_AddWidgets(extra_table,
TXT_NewLabel("OPL type"),
TXT_NewDropdownList(&opl_type, opltype_strings, 2),
NULL);
- }
- else
- {
- TXT_InitTable(extra_table, 1);
- if (snd_musicmode == MUSICMODE_GUS)
- {
- TXT_AddWidgets(extra_table,
- TXT_NewLabel("GUS patch path:"),
- TXT_NewFileSelector(&gus_patch_path, 30,
- "Select path to GUS patches",
- TXT_DIRECTORY),
- NULL);
- }
+ break;
- if (snd_musicmode == MUSICMODE_NATIVE)
- {
- TXT_AddWidgets(extra_table,
- TXT_NewLabel("Timidity configuration file:"),
- TXT_NewFileSelector(&timidity_cfg_path, 30,
- "Select Timidity config file",
- cfg_extension),
- NULL);
- }
+ case MUSICMODE_GUS:
+ TXT_InitTable(extra_table, 1);
+ TXT_AddWidgets(extra_table,
+ TXT_NewLabel("GUS patch path:"),
+ TXT_NewFileSelector(&gus_patch_path, 30,
+ "Select path to GUS patches",
+ TXT_DIRECTORY),
+ NULL);
+ break;
+
+ case MUSICMODE_NATIVE:
+ TXT_InitTable(extra_table, 1);
+ TXT_AddWidgets(extra_table,
+ TXT_NewLabel("Timidity configuration file:"),
+ TXT_NewFileSelector(&timidity_cfg_path, 30,
+ "Select Timidity config file",
+ cfg_extension),
+ NULL);
+ break;
}
}