From 1e516e34911d3a95479c303fe26b59f20e618252 Mon Sep 17 00:00:00 2001 From: Nuke.YKT Date: Fri, 29 May 2015 17:30:12 +0900 Subject: Text formatting. --- src/setup/sound.c | 48 ++++++++++++++++++++++-------------------------- 1 file changed, 22 insertions(+), 26 deletions(-) (limited to 'src/setup') 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; } } -- cgit v1.2.3