diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2002-12-08 14:30:32 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2002-12-08 14:30:32 +0100 |
commit | fb16fbafaadcd6bc0a8fbde20c8434a69bef0f10 (patch) | |
tree | 0687196922d2428cc98b0cb303462b8b8989f18e /vdr.c | |
parent | a40c8b8a98ed026b27f18a5e6c6f8bfae5f6068b (diff) | |
download | vdr-fb16fbafaadcd6bc0a8fbde20c8434a69bef0f10.tar.gz vdr-fb16fbafaadcd6bc0a8fbde20c8434a69bef0f10.tar.bz2 |
KBD active by default; no more 'ncurses' necessary for KBD1.1.19
Diffstat (limited to 'vdr.c')
-rw-r--r-- | vdr.c | 19 |
1 files changed, 14 insertions, 5 deletions
@@ -22,13 +22,14 @@ * * The project's page is at http://www.cadsoft.de/people/kls/vdr * - * $Id: vdr.c 1.136 2002/12/01 10:44:48 kls Exp $ + * $Id: vdr.c 1.137 2002/12/08 13:34:39 kls Exp $ */ #include <getopt.h> #include <locale.h> #include <signal.h> #include <stdlib.h> +#include <termios.h> #include <unistd.h> #include "audio.h" #include "channels.h" @@ -77,6 +78,11 @@ static void Watchdog(int signum) int main(int argc, char *argv[]) { + // Save terminal settings: + + struct termios savedTm; + tcgetattr(STDIN_FILENO, &savedTm); + // Initiate locale: setlocale(LC_ALL, ""); @@ -294,7 +300,7 @@ int main(int argc, char *argv[]) // Daemon mode: if (DaemonMode) { -#if !defined(DEBUG_OSD) && !defined(REMOTE_KBD) +#if !defined(DEBUG_OSD) pid_t pid = fork(); if (pid < 0) { fprintf(stderr, "%m\n"); @@ -307,7 +313,7 @@ int main(int argc, char *argv[]) fclose(stdout); fclose(stderr); #else - fprintf(stderr, "vdr: can't run in daemon mode with DEBUG_OSD or REMOTE_KBD on!\n"); + fprintf(stderr, "vdr: can't run in daemon mode with DEBUG_OSD on!\n"); return 2; #endif } @@ -378,8 +384,10 @@ int main(int argc, char *argv[]) new cRcuRemote("/dev/ttyS1"); #elif defined(REMOTE_LIRC) new cLircRemote("/dev/lircd"); -#elif defined(REMOTE_KBD) - new cKbdRemote; +#endif +#if defined(REMOTE_KBD) + if (!DaemonMode) + new cKbdRemote; #endif Interface->LearnKeys(); @@ -716,6 +724,7 @@ int main(int argc, char *argv[]) isyslog("exiting"); if (SysLogLevel > 0) closelog(); + tcsetattr(STDIN_FILENO, TCSANOW, &savedTm); if (cThread::EmergencyExit()) { esyslog("emergency exit!"); return 1; |