diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2018-03-06 10:38:18 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2018-03-06 10:38:18 +0100 |
commit | 746ce7d4067fc5f31c6e540e4179583f7713ba58 (patch) | |
tree | 0c3ce9f161f83f5ed86d14a47e9fc0468477f536 | |
parent | bb4b6901ad4726217d0af4019d03078e51ec93a4 (diff) | |
download | vdr-746ce7d4067fc5f31c6e540e4179583f7713ba58.tar.gz vdr-746ce7d4067fc5f31c6e540e4179583f7713ba58.tar.bz2 |
Fixed keeping the offset of the list cursor in case it is at the very top of the visible part of the list
-rw-r--r-- | osdbase.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: osdbase.c 4.3 2017/11/07 15:42:47 kls Exp $ + * $Id: osdbase.c 4.4 2018/03/06 10:38:18 kls Exp $ */ #include "osdbase.h" @@ -92,7 +92,7 @@ cOsdMenu::cOsdMenu(const char *Title, int c0, int c1, int c2, int c3, int c4) SetTitle(Title); SetCols(c0, c1, c2, c3, c4); first = 0; - lastOffset = 0; + lastOffset = -1; current = marked = -1; subMenu = NULL; helpRed = helpGreen = helpYellow = helpBlue = NULL; @@ -282,9 +282,9 @@ void cOsdMenu::Display(void) void cOsdMenu::SetCurrent(cOsdItem *Item) { current = Item ? Item->Index() : -1; - if (current >= 0 && lastOffset > 0) + if (current >= 0 && lastOffset >= 0) first = max(0, current - lastOffset); - lastOffset = 0; + lastOffset = -1; } void cOsdMenu::RefreshCurrent(void) |