summaryrefslogtreecommitdiff
path: root/alsamixer
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-06-15 12:53:30 +0000
committerTakashi Iwai <tiwai@suse.de>2005-06-15 12:53:30 +0000
commit74dca8fd02034075e561e86a480dadbe35d554da (patch)
treea479866b0dd2def7846de7dda63f31b1e4700f8c /alsamixer
parent11f789c4f9c8c44e6403aa22db0a5f10a28e085f (diff)
Fix a wrong display in the last patch
Fixed a wrong item display in the last patch.
Diffstat (limited to 'alsamixer')
-rw-r--r--alsamixer/alsamixer.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/alsamixer/alsamixer.c b/alsamixer/alsamixer.c
index 2b51fb7..2a51c61 100644
--- a/alsamixer/alsamixer.c
+++ b/alsamixer/alsamixer.c
@@ -957,6 +957,7 @@ mixer_update_cbar (int elem_index)
/* update the focused full bar name
*/
if (elem_index == mixer_focus_elem) {
+ char tmp[50];
/* control muted? */
swl = swr = 1;
extra_info = "";
@@ -968,20 +969,20 @@ mixer_update_cbar (int elem_index)
extra_info = !swl && !swr ? " [Off]" : "";
}
if (type == MIXER_ELEM_ENUM) {
+ /* FIXME: should show the item names of secondary and later channels... */
unsigned int eidx, length;
- char tmp[50];
tmp[0]=' ';
tmp[1]='[';
if (! snd_mixer_selem_get_enum_item(elem, 0, &eidx) &&
! snd_mixer_selem_get_enum_item_name(elem, eidx, sizeof(tmp) - 3, tmp+2)) {
- tmp[48] = 0;
+ tmp[sizeof(tmp)-2] = 0;
length=strlen(tmp);
tmp[length]=']';
tmp[length+1]=0;
- display_item_info(elem_index, sid, tmp);
- } else
- display_item_info(elem_index, sid, extra_info);
+ extra_info = tmp;
+ }
}
+ display_item_info(elem_index, sid, extra_info);
}
/* get channel bar position