diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2009-06-01 11:57:46 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2009-06-01 11:57:46 +0200 |
commit | 78d2fd3d0e2a69c27581afe710f5598862a750be (patch) | |
tree | cce6baf2ff5a9ab258eea9b00ff0de045ff43c9b /osdbase.c | |
parent | 6f912d247fdb4f16c99e6e974f5a4d0b59dfd80f (diff) | |
download | vdr-78d2fd3d0e2a69c27581afe710f5598862a750be.tar.gz vdr-78d2fd3d0e2a69c27581afe710f5598862a750be.tar.bz2 |
Fixed cOsdMenu::Display() in case the menu size has changed
Diffstat (limited to 'osdbase.c')
-rw-r--r-- | osdbase.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: osdbase.c 1.32 2008/02/17 11:33:04 kls Exp $ + * $Id: osdbase.c 2.1 2009/06/01 11:54:50 kls Exp $ */ #include "osdbase.h" @@ -217,6 +217,7 @@ void cOsdMenu::Display(void) } if (current < 0) current = 0; // just for safety - there HAS to be a current item! + first = min(first, max(0, count - displayMenuItems)); // in case the menu size has changed if (current - first >= displayMenuItems || current < first) { first = current - displayMenuItems / 2; if (first + displayMenuItems > count) |