summaryrefslogtreecommitdiff
path: root/vdr.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2001-09-08 12:18:02 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2001-09-08 12:18:02 +0200
commit57b324cd424aa2d4be111fb824e2a024c7f1fc11 (patch)
treebadefb12ca904bfdb21d65646c4a2a67657522d1 /vdr.c
parent0c8cc01b1a29d7a7647562ab7be58b0044a9dcae (diff)
downloadvdr-57b324cd424aa2d4be111fb824e2a024c7f1fc11.tar.gz
vdr-57b324cd424aa2d4be111fb824e2a024c7f1fc11.tar.bz2
Fixed channel toggling in case 'Ok' has been pressed
Diffstat (limited to 'vdr.c')
-rw-r--r--vdr.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/vdr.c b/vdr.c
index a41fa5d0..f71cfd12 100644
--- a/vdr.c
+++ b/vdr.c
@@ -22,7 +22,7 @@
*
* The project's page is at http://www.cadsoft.de/people/kls/vdr
*
- * $Id: vdr.c 1.69 2001/09/07 15:37:26 kls Exp $
+ * $Id: vdr.c 1.70 2001/09/08 12:15:05 kls Exp $
*/
#define _GNU_SOURCE
@@ -329,7 +329,8 @@ int main(int argc, char *argv[])
if (!EITScanner.Active() && cDvbApi::CurrentChannel() != LastChannel) {
if (!Menu)
Menu = new cDisplayChannel(cDvbApi::CurrentChannel(), LastChannel > 0);
- PreviousChannel = LastChannel;
+ if (LastChannel > 0)
+ PreviousChannel = LastChannel;
LastChannel = cDvbApi::CurrentChannel();
}
// Timers and Recordings:
@@ -391,10 +392,12 @@ int main(int argc, char *argv[])
else {
switch (key) {
// Toggle channels:
- case k0:
- if (PreviousChannel != cDvbApi::CurrentChannel())
- Channels.SwitchTo(PreviousChannel);
+ case k0: {
+ int CurrentChannel = cDvbApi::CurrentChannel();
+ Channels.SwitchTo(PreviousChannel);
+ PreviousChannel = CurrentChannel;
break;
+ }
// Direct Channel Select:
case k1 ... k9:
Menu = new cDisplayChannel(key);