aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Reisner <d@falconindy.com>2012-09-06 16:56:28 -0700
committerDave Reisner <d@falconindy.com>2012-09-06 16:56:28 -0700
commit0bae720b998d3d8b9e8cd0bebe21da972601da13 (patch)
treed326eca1a3ba06494ee462e7705e6861258f0cf6
parent15041b0d168ace6057da6bea475f1186815d0a08 (diff)
parentbafddf7c3555f41eae7ee8fe0b7de64e516fa851 (diff)
downloadmirror-ponymix-0bae720b998d3d8b9e8cd0bebe21da972601da13.tar.gz
mirror-ponymix-0bae720b998d3d8b9e8cd0bebe21da972601da13.tar.bz2
mirror-ponymix-0bae720b998d3d8b9e8cd0bebe21da972601da13.zip
Merge pull request #4 from vodik/bugfixes
Bugfixes
-rw-r--r--ponymix.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ponymix.c b/ponymix.c
index d808d3a..15f2f2f 100644
--- a/ponymix.c
+++ b/ponymix.c
@@ -740,6 +740,11 @@ static int do_verb(struct pulseaudio_t *pulse, enum action verb, int value)
return set_balance(pulse, pulse->head,
CLAMP(pulse->head->balance + value, -100, 100));
case ACTION_INCREASE:
+ if (pulse->head->volume_percent > 100) {
+ printf("%d\n", pulse->head->volume_percent);
+ return 0;
+ }
+
return set_volume(pulse, pulse->head,
CLAMP(pulse->head->volume_percent + value, 0, 100));
case ACTION_DECREASE:
@@ -818,7 +823,7 @@ int main(int argc, char *argv[])
}
if (optind == argc)
- verb = mode == MODE_DEVICE ? ACTION_LIST : ACTION_DEFAULTS;
+ verb = mode == MODE_DEVICE ? ACTION_DEFAULTS : ACTION_LIST;
else
verb = string_to_verb(argv[optind++]);