From cced1146b3b086f924db56ff6770744115fad628 Mon Sep 17 00:00:00 2001 From: Thomas Perl Date: Tue, 19 Dec 2023 21:38:44 +0100 Subject: [PATCH] Text-mode UI: Nice display of sound card name --- mpxplay/au_cards/au_cards.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/mpxplay/au_cards/au_cards.c b/mpxplay/au_cards/au_cards.c index 85ffddb7..100f17ea 100644 --- a/mpxplay/au_cards/au_cards.c +++ b/mpxplay/au_cards/au_cards.c @@ -206,7 +206,7 @@ void AU_init(struct mpxplay_audioout_info_s *aui) }else #endif { - if(!(aui->card_controlbits&AUINFOS_CARDCNTRLBIT_TESTCARD) && !(aui->card_controlbits&AUINFOS_CARDCNTRLBIT_SILENT)){ + if(strcmp(cardselectname, "NUL")!=0 && !(aui->card_controlbits&AUINFOS_CARDCNTRLBIT_TESTCARD) && !(aui->card_controlbits&AUINFOS_CARDCNTRLBIT_SILENT)){ sprintf(sout,"Unknown soundcard (output module) name : %s",cardselectname); pds_textdisplay_printf(sout); } @@ -349,7 +349,7 @@ void AU_init(struct mpxplay_audioout_info_s *aui) goto err_out_auinit; } if(!aui->card_handler && !(aui->card_controlbits&AUINFOS_CARDCNTRLBIT_SILENT)){ - pds_textdisplay_printf("No soundcard found!"); + pds_textdisplay_printf("No supported soundcard found!"); goto err_out_auinit; } } @@ -357,10 +357,17 @@ void AU_init(struct mpxplay_audioout_info_s *aui) #ifdef SBEMU if(!(aui->card_controlbits&AUINFOS_CARDCNTRLBIT_SILENT)) { + textcolor(LIGHTGRAY); if(aui->card_select_index) - printf("Selected sound card %d: %s\n", aui->card_select_index, aui->card_handler->shortname); + cprintf("Sound card (index %d): ", aui->card_select_index); else - printf("Found sound card: %s\n", aui->card_handler->shortname); + cprintf("Sound card: "); + + textcolor(LIGHTBLUE); + cprintf("%s", aui->card_handler->shortname); + + textcolor(LIGHTGRAY); + cprintf(".\r\n"); } #endif