summaryrefslogtreecommitdiff
path: root/osd.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2002-03-24 11:23:23 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2002-03-24 11:23:23 +0100
commit1838c02c9e02b2f3a9a5a8f86b89e0700e4225cf (patch)
treed1e3d5265b45b8bcdd82629ba60c77cd0dd504a8 /osd.c
parentc751c195c1a57e6738d402f5b4d42357b8e580d0 (diff)
downloadvdr-1838c02c9e02b2f3a9a5a8f86b89e0700e4225cf.tar.gz
vdr-1838c02c9e02b2f3a9a5a8f86b89e0700e4225cf.tar.bz2
Fixed scrolling the 'Channels' menu in case the cursor ends up on a group delimiter
Diffstat (limited to 'osd.c')
-rw-r--r--osd.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/osd.c b/osd.c
index e404a6f8..0b445780 100644
--- a/osd.c
+++ b/osd.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: osd.c 1.21 2002/03/10 16:18:06 kls Exp $
+ * $Id: osd.c 1.22 2002/03/24 11:23:23 kls Exp $
*/
#include "osd.h"
@@ -288,6 +288,10 @@ void cOsdMenu::PageUp(void)
first -= MAXOSDITEMS;
if (first < 0)
first = current = 0;
+ if (SpecialItem(current)) {
+ current -= (current > 0) ? 1 : -1;
+ first = min(first, current - 1);
+ }
Display();
DisplayCurrent(true);
}
@@ -302,6 +306,10 @@ void cOsdMenu::PageDown(void)
current = Count() - 1;
first = Count() - MAXOSDITEMS;
}
+ if (SpecialItem(current)) {
+ current += (current < Count() - 1) ? 1 : -1;
+ first = max(first, current - MAXOSDITEMS);
+ }
Display();
DisplayCurrent(true);
}