From 0300bbbbb365e8eab2278fdc57c37d4c0dc61f5d Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Fri, 16 Mar 2001 16:46:05 +0000 Subject: [PATCH] Added more sort rules --- src/control/hcontrol.c | 6 ++++++ src/mixer/simple.c | 10 +++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/control/hcontrol.c b/src/control/hcontrol.c index 00e8ee4d..572e45df 100644 --- a/src/control/hcontrol.c +++ b/src/control/hcontrol.c @@ -170,12 +170,18 @@ static int get_compare_weight(const char *name) "Rear", "Pan", "Output", + "-", NULL }; static char *names2[] = { "Switch", "Volume", "Bypass", + "Depth", + "Wide", + "Space", + "Level", + "Center", NULL }; int res, res1; diff --git a/src/mixer/simple.c b/src/mixer/simple.c index 6acf9473..492598dd 100644 --- a/src/mixer/simple.c +++ b/src/mixer/simple.c @@ -110,8 +110,15 @@ static int get_compare_weight(const char *name, int index) "Master", "Master Mono", "Master Digital", + "Headphone", "Bass", "Treble", + "3D Control - Switch", + "3D Control - Depth", + "3D Control - Wide", + "3D Control - Space", + "3D Control - Level", + "3D Control - Center", "PCM", "Surround", "Synth", @@ -633,7 +640,8 @@ static int base_len(const char *name, selem_ctl_type_t *type) size_t l; if (nlen > slen) { l = nlen - slen; - if (strncmp(name + l, p->suffix, slen) == 0) { + if (strncmp(name + l, p->suffix, slen) == 0 && + (l < 1 || name[l-1] != '-')) { /* 3D Control - Switch */ *type = p->type; return l; } -- 2.47.1