summaryrefslogtreecommitdiff
path: root/recmenuitem.c
diff options
context:
space:
mode:
authorkamel5 <vdr.kamel5 (at) gmx (dot) net>2019-07-18 16:47:10 +0200
committerkamel5 <vdr.kamel5 (at) gmx (dot) net>2019-07-19 11:38:07 +0200
commit7f8ac2a2a81c506fcd9c10af6ee7128a337dfa15 (patch)
treec1bf815a03f83c5df393721fe183d9f891b1e033 /recmenuitem.c
parent31f72f2ad82506cd33e25ea3ab2da415d25fc9cb (diff)
downloadvdr-plugin-tvguide-7f8ac2a2a81c506fcd9c10af6ee7128a337dfa15.tar.gz
vdr-plugin-tvguide-7f8ac2a2a81c506fcd9c10af6ee7128a337dfa15.tar.bz2
Rework cRecMenuItemSelect
Diffstat (limited to 'recmenuitem.c')
-rw-r--r--recmenuitem.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/recmenuitem.c b/recmenuitem.c
index 83e7dd7..80daef3 100644
--- a/recmenuitem.c
+++ b/recmenuitem.c
@@ -507,7 +507,6 @@ eRecMenuState cRecMenuItemBool::ProcessKey(eKeys Key) {
// --- cRecMenuItemSelect -------------------------------------------------------
cRecMenuItemSelect::cRecMenuItemSelect(cString text,
std::vector<std::string> Strings,
- int initialVal,
bool active,
int *callback,
eRecMenuState action,
@@ -516,10 +515,9 @@ cRecMenuItemSelect::cRecMenuItemSelect(cString text,
this->text = text;
strings = Strings;
numValues = Strings.size();
- if ((initialVal < 0) || (initialVal > numValues-1))
+ this->currentVal = *callback;
+ if ((this->currentVal < 0) || (this->currentVal > numValues - 1))
this->currentVal = 0;
- else
- this->currentVal = initialVal;
this->active = active;
this->callback = callback;
this->refresh = refresh;