mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
Fixed cOsdMenu::Display() in case the menu size has changed
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user