summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoachim Wilke <vdr@joachim-wilke.de>2009-08-20 22:23:44 +0200
committerJoachim Wilke <vdr@joachim-wilke.de>2009-08-20 22:23:44 +0200
commit0618ae5ef1281d5ec20ecb699debe357b7b8d92b (patch)
treec3e0e5d7c6536f4444d28e2a4d22ac808d34aff1
parentb34352d96ff1fe5f9adfc72f3cf6732ea83d53b2 (diff)
downloadvdr-plugin-lcdproc-0618ae5ef1281d5ec20ecb699debe357b7b8d92b.tar.gz
vdr-plugin-lcdproc-0618ae5ef1281d5ec20ecb699debe357b7b8d92b.tar.bz2
Fixed a bug with displaying the volume bar.
-rw-r--r--HISTORY3
-rw-r--r--Makefile4
-rw-r--r--lcd.c2
3 files changed, 6 insertions, 3 deletions
diff --git a/HISTORY b/HISTORY
index 8627d29..4ed2423 100644
--- a/HISTORY
+++ b/HISTORY
@@ -88,4 +88,7 @@ VDR Plugin 'lcdproc' Revision History
Head:
- updated italian translation
(provided by Diego Pierotto <vdr-italian@tiscali.it>)
+- fixed a bug with displaying the volume bar. If connection to LCDd is lost and
+ volume is changed in the meantime, the volume bar got mixed up after reconnection.
+
\ No newline at end of file
diff --git a/Makefile b/Makefile
index d71805e..58f65e7 100644
--- a/Makefile
+++ b/Makefile
@@ -22,8 +22,8 @@ CXXFLAGS ?= -fPIC -g -O2 -Wall -Woverloaded-virtual
### The directory environment:
-VDRDIR = ../../..
-LIBDIR = ../../lib
+VDRDIR ?= ../../..
+LIBDIR = $(VDRDIR)/PLUGINS/lib
TMPDIR = /tmp
### Allow user defined options to overwrite defaults:
diff --git a/lcd.c b/lcd.c
index 442d63f..f371a31 100644
--- a/lcd.c
+++ b/lcd.c
@@ -356,7 +356,6 @@ void cLcd::SetWarning( const char *string) {
}
void cLcd::ShowVolume(int vol, bool absolute ) {
-if (!connected) return;
BeginMutualExclusion();
if (absolute)
ThreadStateData.volume=vol;
@@ -365,6 +364,7 @@ if (!connected) return;
ThreadStateData.muted=(ThreadStateData.volume==0);
ThreadStateData.showvolume=true;
EndMutualExclusion();
+ if (!connected) return;
if (ThreadStateData.muted) {
cLcd::SetLine(Vol,0," ");
cLcd::SetLine(Vol,1,Convert(tr("Mute")));