summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2004-03-05 15:29:04 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2004-03-05 15:29:04 +0100
commitb845ef01b56c18cab44c3992fd6cae9af2f6467a (patch)
tree70bfefb725afeed12fb642fdd6913436e14e4cb8
parent8ae3142f945aba1166654452e319e3ac361b6356 (diff)
downloadvdr-b845ef01b56c18cab44c3992fd6cae9af2f6467a.tar.gz
vdr-b845ef01b56c18cab44c3992fd6cae9af2f6467a.tar.bz2
Fixed handling the current menu item
-rw-r--r--CONTRIBUTORS3
-rw-r--r--HISTORY1
-rw-r--r--osd.c4
3 files changed, 6 insertions, 2 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 08602fcc..45c06c57 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -944,3 +944,6 @@ Thomas Bergwinkl <Thomas.Bergwinkl@t-online.de>
Stéphane Esté-Gracias <sestegra@free.fr>
for fixing a typo in libsi/si.h
for fixing some descriptor handling in 'libsi'
+
+Marc Hoppe <MarcHoppe@gmx.de>
+ for fixing handling the current menu item
diff --git a/HISTORY b/HISTORY
index fdcf78f9..f4530d3f 100644
--- a/HISTORY
+++ b/HISTORY
@@ -2718,3 +2718,4 @@ Video Disk Recorder Revision History
- Completed the Finnish OSD texts (thanks to Rolf Ahrenberg).
- Fixed some descriptor handling in 'libsi' (thanks to Stéphane Esté-Gracias).
+- Fixed handling the current menu item (thanks to Marc Hoppe).
diff --git a/osd.c b/osd.c
index 8f3343b8..2af1db2c 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.43 2003/06/04 16:13:00 kls Exp $
+ * $Id: osd.c 1.44 2004/03/05 15:27:48 kls Exp $
*/
#include "osd.h"
@@ -437,7 +437,7 @@ void cOsdMenu::Display(void)
if (current < 0)
current = 0; // just for safety - there HAS to be a current item!
int n = 0;
- if (current - first >= MAXOSDITEMS) {
+ if (current - first >= MAXOSDITEMS || current < first) {
first = current - MAXOSDITEMS / 2;
if (first + MAXOSDITEMS > count)
first = count - MAXOSDITEMS;