summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2000-07-15 18:00:00 +0200
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2000-07-15 18:00:00 +0200
commit3b78ec8374aac8daa560fa0cd06260fca6eb1500 (patch)
treee753b7fb9304a47651926ce1db67f83127b510fb /config.c
parent9599a8fd8a6724e55ec4ad2ba2c975c0850073d9 (diff)
downloadvdr-patch-lnbsharing-3b78ec8374aac8daa560fa0cd06260fca6eb1500.tar.gz
vdr-patch-lnbsharing-3b78ec8374aac8daa560fa0cd06260fca6eb1500.tar.bz2
Version 0.06vdr-0.06
- Added support for LIRC remote control (thanks to Carsten Koch!). There are now three different remote control modes: KBD (PC-Keyboard), RCU and LIRC. See the INSTALL file for information on how to enable either of these modes. The default mode is now KBD, not RCU as before (to make it work immediately even if there is no actual remote control).
Diffstat (limited to 'config.c')
-rw-r--r--config.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/config.c b/config.c
index 7e02c91..ca43ff0 100644
--- a/config.c
+++ b/config.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: config.c 1.7 2000/05/27 14:44:15 kls Exp $
+ * $Id: config.c 1.8 2000/06/24 13:43:14 kls Exp $
*/
#include "config.h"
@@ -146,6 +146,17 @@ eKeys cKeys::Get(unsigned int Code)
return kNone;
}
+unsigned int cKeys::Encode(const char *Command)
+{
+ if (Command != NULL) {
+ const tKey *k = keys;
+ while ((k->type != kNone) && strncmp(k->name, Command, strlen(k->name)) != 0) //XXX why 'strncmp()'???
+ k++;
+ return k->code;
+ }
+ return 0;
+}
+
void cKeys::Set(eKeys Key, unsigned int Code)
{
for (tKey *k = keys; k->type != kNone; k++) {