From 0618ae5ef1281d5ec20ecb699debe357b7b8d92b Mon Sep 17 00:00:00 2001 From: Joachim Wilke Date: Thu, 20 Aug 2009 22:23:44 +0200 Subject: Fixed a bug with displaying the volume bar. --- HISTORY | 3 +++ Makefile | 4 ++-- lcd.c | 2 +- 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 ) +- 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"))); -- cgit v1.2.3