diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2002-03-09 17:11:49 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2002-03-09 17:11:49 +0100 |
commit | d5c01bbe5a4de6861f523450121c6f4c00539561 (patch) | |
tree | fb01623822bce89a12e4b4828d4f729e8dba0b16 /vdr.c | |
parent | cb90e9b8dc05164c5a3f1b4550003a2a55409144 (diff) | |
download | vdr-d5c01bbe5a4de6861f523450121c6f4c00539561.tar.gz vdr-d5c01bbe5a4de6861f523450121c6f4c00539561.tar.bz2 |
Implemented OSD for Volume and Mute
Diffstat (limited to 'vdr.c')
-rw-r--r-- | vdr.c | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -22,7 +22,7 @@ * * The project's page is at http://www.cadsoft.de/people/kls/vdr * - * $Id: vdr.c 1.100 2002/03/08 17:14:43 kls Exp $ + * $Id: vdr.c 1.101 2002/03/09 17:10:16 kls Exp $ */ #include <getopt.h> @@ -357,10 +357,16 @@ int main(int argc, char *argv[]) case kVolUp: case kVolDn|k_Repeat: case kVolDn: - cDvbApi::PrimaryDvbApi->SetVolume(NORMALKEY(key) == kVolDn ? -VOLUMEDELTA : VOLUMEDELTA); - break; case kMute: - cDvbApi::PrimaryDvbApi->ToggleMute(); + if (key == kMute) { + if (!cDvbApi::PrimaryDvbApi->ToggleMute() && !Menu) + break; // no need to display "mute off" + } + else + cDvbApi::PrimaryDvbApi->SetVolume(NORMALKEY(key) == kVolDn ? -VOLUMEDELTA : VOLUMEDELTA); + if (!Menu && (!ReplayControl || !ReplayControl->Visible())) + Menu = cDisplayVolume::Create(); + cDisplayVolume::Process(key); break; // Power off: case kPower: isyslog(LOG_INFO, "Power button pressed"); |