diff options
author | Nuke.YKT | 2015-05-29 17:30:12 +0900 |
---|---|---|
committer | Nuke.YKT | 2015-05-29 17:30:12 +0900 |
commit | 1e516e34911d3a95479c303fe26b59f20e618252 (patch) | |
tree | 09fae977fd34c03759d5c90e7daf2a087e6e7756 /src/setup | |
parent | 54c2e6d4e513cd74fa35e05f9de840c4a8647b8d (diff) | |
download | chocolate-doom-1e516e34911d3a95479c303fe26b59f20e618252.tar.gz chocolate-doom-1e516e34911d3a95479c303fe26b59f20e618252.tar.bz2 chocolate-doom-1e516e34911d3a95479c303fe26b59f20e618252.zip |
Text formatting.
Diffstat (limited to 'src/setup')
-rw-r--r-- | src/setup/sound.c | 48 |
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; } } |