Little changes...
This commit is contained in:
parent
511d11e583
commit
74a386d8c5
1 changed files with 6 additions and 3 deletions
|
|
@ -489,10 +489,13 @@ static void set_switch_boolean(int val)
|
|||
|
||||
if (sw->type != SND_CTL_SW_TYPE_BOOLEAN)
|
||||
yyerror("Switch '%s' isn't boolean type...", sw->name);
|
||||
xx = val & 1;
|
||||
if (memcmp(&sw->value, &xx, sizeof(xx)))
|
||||
xx = val ? 1 : 0;
|
||||
if (sw->value.enable != xx) {
|
||||
printf("change!!\n");
|
||||
*Xswitchchange = 1;
|
||||
memcpy(&sw->value, &xx, sizeof(xx));
|
||||
}
|
||||
sw->value.enable = xx;
|
||||
printf("name = '%s', sw->value.enable = %i\n", sw->name, xx);
|
||||
}
|
||||
|
||||
static void set_switch_integer(int val)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue