[vdr] VDR developer version 1.3.26

Udo Richter udo_richter at gmx.de
Mon Jun 13 15:50:16 CEST 2005


Klaus Schmidinger wrote:
> Well, looks like the change in handling "page down" in menus
> made it impossible to get the last page of a menu to display
> full screen. Here's a small fix for that:

Ok, now that this is completely broken, lets try to clean it up. ;)

The basic question is, how should VDR behave at the end of menus? The
previous behavior wasn't perfect either, resulting in back-jumps: While
paging down, the last page got displayed partially filled, and the next
page down actually moved the visible range up, to completely fill the
last page.

My suggestion is to avoid empty lines at the end of the menu completely,
whenever possible. The attached patch (against original 1.3.26) does
this, and also restores the old behavior on single-page menus.

Cheers,

Udo
-------------- next part --------------
--- vdr-1.3.26-original/osdbase.c	2005-06-12 12:44:22.000000000 +0200
+++ vdr-1.3.26/osdbase.c	2005-06-13 14:58:30.000000000 +0200
@@ -350,6 +350,10 @@
   current += displayMenuItems;
   first += displayMenuItems;
   int last = Count() - 1;
+  if (first + displayMenuItems > last) {
+     first = last - displayMenuItems + 1;
+     if (first < 0) first = 0;
+     }
   int tmpCurrent = current;
   while (!SelectableItem(tmpCurrent) && ++tmpCurrent <= last)
         ;


More information about the vdr mailing list