1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Fixed handling the current menu item

This commit is contained in:
Klaus Schmidinger 2004-03-05 15:29:04 +01:00
parent 8ae3142f94
commit b845ef01b5
3 changed files with 6 additions and 2 deletions

View File

@ -944,3 +944,6 @@ Thomas Bergwinkl <Thomas.Bergwinkl@t-online.de>
Stéphane Esté-Gracias <sestegra@free.fr> Stéphane Esté-Gracias <sestegra@free.fr>
for fixing a typo in libsi/si.h for fixing a typo in libsi/si.h
for fixing some descriptor handling in 'libsi' for fixing some descriptor handling in 'libsi'
Marc Hoppe <MarcHoppe@gmx.de>
for fixing handling the current menu item

View File

@ -2718,3 +2718,4 @@ Video Disk Recorder Revision History
- Completed the Finnish OSD texts (thanks to Rolf Ahrenberg). - Completed the Finnish OSD texts (thanks to Rolf Ahrenberg).
- Fixed some descriptor handling in 'libsi' (thanks to Stéphane Esté-Gracias). - Fixed some descriptor handling in 'libsi' (thanks to Stéphane Esté-Gracias).
- Fixed handling the current menu item (thanks to Marc Hoppe).

4
osd.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * 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" #include "osd.h"
@ -437,7 +437,7 @@ void cOsdMenu::Display(void)
if (current < 0) if (current < 0)
current = 0; // just for safety - there HAS to be a current item! current = 0; // just for safety - there HAS to be a current item!
int n = 0; int n = 0;
if (current - first >= MAXOSDITEMS) { if (current - first >= MAXOSDITEMS || current < first) {
first = current - MAXOSDITEMS / 2; first = current - MAXOSDITEMS / 2;
if (first + MAXOSDITEMS > count) if (first + MAXOSDITEMS > count)
first = count - MAXOSDITEMS; first = count - MAXOSDITEMS;