diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2001-02-24 16:26:11 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2001-02-24 16:26:11 +0100 |
commit | 76521306b1c8bc2c357bdb7cecc7dd6c276138e5 (patch) | |
tree | 2f192c54570acc1f111e4b96ae8e9a476c450659 /osd.c | |
parent | 5e0ee042c75296fb78567638b2768df5a262ad7b (diff) | |
download | vdr-76521306b1c8bc2c357bdb7cecc7dd6c276138e5.tar.gz vdr-76521306b1c8bc2c357bdb7cecc7dd6c276138e5.tar.bz2 |
Paging up/down in lists no longer wraps0.7.1
Diffstat (limited to 'osd.c')
-rw-r--r-- | osd.c | 14 |
1 files changed, 5 insertions, 9 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: osd.c 1.15 2001/02/03 15:14:45 kls Exp $ + * $Id: osd.c 1.16 2001/02/24 16:26:11 kls Exp $ */ #include "osd.h" @@ -257,13 +257,10 @@ void cOsdMenu::PageUp(void) { if (Count() <= MAXOSDITEMS) return; - int relpos = current - first; current -= MAXOSDITEMS; first -= MAXOSDITEMS; - if (first < 0) { - first = Count() - MAXOSDITEMS; - current = first + relpos; - } + if (first < 0) + first = current = 0; Display(); DisplayCurrent(true); } @@ -272,12 +269,11 @@ void cOsdMenu::PageDown(void) { if (Count() <= MAXOSDITEMS) return; - int relpos = current - first; current += MAXOSDITEMS; first += MAXOSDITEMS; if (current > Count() - 1) { - first = 0; - current = first + relpos; + current = Count() - 1; + first = Count() - MAXOSDITEMS; } Display(); DisplayCurrent(true); |