summaryrefslogtreecommitdiff
path: root/osdbase.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2006-02-05 14:38:56 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2006-02-05 14:38:56 +0100
commit7e4662f98233f1262946fb3b9b3dd2681cae1562 (patch)
tree3dd975a30b528aa044ea4e2c32e2d8ced1cbda10 /osdbase.c
parent7b97eb6e97d2156298bb06b0dfd13a12c68c525c (diff)
downloadvdr-7e4662f98233f1262946fb3b9b3dd2681cae1562.tar.gz
vdr-7e4662f98233f1262946fb3b9b3dd2681cae1562.tar.bz2
Fixed scrolling with Up/Down in case there are non-selectable items at the beginning or end of the menu
Diffstat (limited to 'osdbase.c')
-rw-r--r--osdbase.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/osdbase.c b/osdbase.c
index d81c33b9..65b66cb8 100644
--- a/osdbase.c
+++ b/osdbase.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: osdbase.c 1.28 2006/01/08 11:40:02 kls Exp $
+ * $Id: osdbase.c 1.29 2006/02/05 14:37:03 kls Exp $
*/
#include "osdbase.h"
@@ -280,6 +280,12 @@ void cOsdMenu::CursorUp(void)
return;
while (--tmpCurrent != current) {
if (tmpCurrent < 0) {
+ if (first > 0) {
+ // make non-selectable items at the beginning visible:
+ first = 0;
+ Display();
+ return;
+ }
if (Setup.MenuScrollWrap)
tmpCurrent = last + 1;
else
@@ -312,6 +318,12 @@ void cOsdMenu::CursorDown(void)
return;
while (++tmpCurrent != current) {
if (tmpCurrent > last) {
+ if (first < last - displayMenuItems) {
+ // make non-selectable items at the end visible:
+ first = last - displayMenuItems + 1;
+ Display();
+ return;
+ }
if (Setup.MenuScrollWrap)
tmpCurrent = -1;
else