summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTORS1
-rw-r--r--HISTORY2
-rw-r--r--interface.c14
-rw-r--r--interface.h4
4 files changed, 15 insertions, 6 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 254c7ec7..b7b47b7f 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -495,6 +495,7 @@ Oliver Endriss <o.endriss@gmx.de>
recording that is still going on
for fixing checking for VIDEO_STREAM_S in cRemux::SetBrokenLink()
for suggesting to add 'repeat' function keys '7' and '9'
+ for fixing handling rc key learning in case cRemote::Initialize() returns 'false'
Reinhard Walter Buchner <rw.buchner@freenet.de>
for adding some satellites to 'sources.conf'
diff --git a/HISTORY b/HISTORY
index 162dca6e..e9397754 100644
--- a/HISTORY
+++ b/HISTORY
@@ -2414,3 +2414,5 @@ Video Disk Recorder Revision History
- Fixed detecting the /dev/videoN devices for GRAB in case there are others
before the DVB devices (thanks to Andreas Kool).
- Updated 'channels.conf.terr' for Berlin (thanks to Markus Hardt).
+- Fixed handling rc key learning in case cRemote::Initialize() returns 'false'
+ (thanks to Oliver Endriss).
diff --git a/interface.c b/interface.c
index 6431f911..cff07744 100644
--- a/interface.c
+++ b/interface.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: interface.c 1.64 2003/04/27 12:08:52 kls Exp $
+ * $Id: interface.c 1.65 2003/10/05 09:48:13 kls Exp $
*/
#include "interface.h"
@@ -329,7 +329,7 @@ void cInterface::Help(const char *Red, const char *Green, const char *Yellow, co
cStatus::MsgOsdHelpKeys(Red, Green, Yellow, Blue);
}
-void cInterface::QueryKeys(cRemote *Remote)
+bool cInterface::QueryKeys(cRemote *Remote)
{
WriteText(1, 3, tr("Phase 1: Detecting RC code type"));
WriteText(1, 5, tr("Press any key on the RC unit"));
@@ -372,7 +372,7 @@ void cInterface::QueryKeys(cRemote *Remote)
Key = cRemote::Get(100);
if (Key == kUp) {
Clear();
- return;
+ return true;
}
else if (Key == kDown) {
ClearEol(0, 6);
@@ -406,7 +406,9 @@ void cInterface::QueryKeys(cRemote *Remote)
else
ClearEol(0, 9);
}
+ return true;
}
+ return false;
}
void cInterface::LearnKeys(void)
@@ -426,9 +428,13 @@ void cInterface::LearnKeys(void)
cRemote::Clear();
WriteText(1, 1, Headline);
cRemote::SetLearning(Remote);
- QueryKeys(Remote);
+ bool rc = QueryKeys(Remote);
cRemote::SetLearning(NULL);
Clear();
+ if (!rc) {
+ Close();
+ return;
+ }
WriteText(1, 1, Headline);
WriteText(1, 3, tr("Phase 3: Saving key codes"));
WriteText(1, 5, tr("Press 'Up' to save, 'Down' to cancel"));
diff --git a/interface.h b/interface.h
index e78b9ebc..bcc29df0 100644
--- a/interface.h
+++ b/interface.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: interface.h 1.29 2002/11/30 14:37:04 kls Exp $
+ * $Id: interface.h 1.30 2003/10/05 09:42:53 kls Exp $
*/
#ifndef __INTERFACE_H
@@ -24,7 +24,7 @@ private:
int cols[MaxCols];
bool interrupted;
cSVDRP *SVDRP;
- void QueryKeys(cRemote *Remote);
+ bool QueryKeys(cRemote *Remote);
void HelpButton(int Index, const char *Text, eDvbColor FgColor, eDvbColor BgColor);
eKeys Wait(int Seconds = 0, bool KeepChar = false);
public: