summaryrefslogtreecommitdiff
path: root/patches/lcdproc-0.0.10-fix_for_absolute_volume.diff
diff options
context:
space:
mode:
Diffstat (limited to 'patches/lcdproc-0.0.10-fix_for_absolute_volume.diff')
-rw-r--r--patches/lcdproc-0.0.10-fix_for_absolute_volume.diff21
1 files changed, 21 insertions, 0 deletions
diff --git a/patches/lcdproc-0.0.10-fix_for_absolute_volume.diff b/patches/lcdproc-0.0.10-fix_for_absolute_volume.diff
new file mode 100644
index 0000000..24ef596
--- /dev/null
+++ b/patches/lcdproc-0.0.10-fix_for_absolute_volume.diff
@@ -0,0 +1,21 @@
+diff -rup lcdproc-0.0.10.sav/lcd.c lcdproc-0.0.10/lcd.c
+--- lcdproc-0.0.10.sav/lcd.c Wed Aug 30 21:11:17 2006
++++ lcdproc-0.0.10/lcd.c Sun Sep 17 12:48:23 2006
+@@ -258,11 +258,14 @@ void cLcd::SetWarning( const char *strin
+ }
+ }
+
+-void cLcd::ShowVolume(unsigned int vol, bool muted ) {
++void cLcd::ShowVolume(unsigned int vol, bool absolute ) {
+ if (!connected) return;
+ BeginMutualExclusion();
+- ThreadStateData.volume=vol;
+- ThreadStateData.muted=muted;
++ if (absolute)
++ ThreadStateData.volume=vol;
++ else
++ ThreadStateData.volume+=vol;
++ ThreadStateData.muted=(ThreadStateData.volume==0);
+ ThreadStateData.showvolume=true;
+ EndMutualExclusion();
+ if (ThreadStateData.muted) {