diff options
author | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2002-12-15 18:00:00 +0100 |
---|---|---|
committer | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2002-12-15 18:00:00 +0100 |
commit | 48fd2b04e9010bb67e19f33e8c7506a976b70e90 (patch) | |
tree | 193831c898b7adfcab65262a1442c27f249f42c1 /vdr.c | |
parent | 2b15337b71d71c5e486efe738a507b550bb28843 (diff) | |
download | vdr-patch-lnbsharing-48fd2b04e9010bb67e19f33e8c7506a976b70e90.tar.gz vdr-patch-lnbsharing-48fd2b04e9010bb67e19f33e8c7506a976b70e90.tar.bz2 |
Version 1.1.20vdr-1.1.20
- Now checking if there is a connection to the keyboard (thanks to Jaakko Hyvätti)
and only creating the KBD remote control if VDR is running in the foreground.
- Fixed taking an active SVDRP connection into account when doing shutdown (thanks
to Gregoire Favre for reporting this one).
- Changed setting of CXX and CXXFLAGS variables in Makefile, so that an externally
defined value will be taken if present (suggested by Robert Schiele).
Plugin authors should please change the lines
CXX = g++
CXXFLAGS = -O2 -Wall -Woverloaded-virtual
in their Makefile to
CXX ?= g++
CXXFLAGS ?= -O2 -Wall -Woverloaded-virtual
- Fixed recording overlapping timers on the same channel in case
DO_REC_AND_PLAY_ON_PRIMARY_DEVICE and/or DO_MULTIPLE_RECORDINGS is not defined
(thanks to Jaakko Hyvätti).
- No longer stopping/restarting the DMX when switching audio channels (thanks to
Sven Goethel).
- Fixed high CPU load in 'Transfer Mode' (thanks to Oliver Endriss).
- If a PC keyboard is used as remote control, the string entry fields in the
menus now accept character input directly (however, this works only for keys that
are not otherwise defined as remote control keys). Also, plugins can switch the
cKbdRemote class into "raw mode", where all keyboard input will be made available
through the new 'kKbd' key code and none of it will be processed as normal remote
control functions (thanks to Jan Rieger for suggestions and testing).
- Fixed deleting characters in string entry fields in 'insert' mode.
- Now using "Doxygen" to generate source documentation (thanks to Walter Stroebel
for providing an initial 'Doxyfile' configuration and adjusting some comments).
See INSTALL for information how to do this. Some function descriptions have
already been adapted to Doxygen, more will follow.
Diffstat (limited to 'vdr.c')
-rw-r--r-- | vdr.c | 17 |
1 files changed, 11 insertions, 6 deletions
@@ -22,7 +22,7 @@ * * The project's page is at http://www.cadsoft.de/people/kls/vdr * - * $Id: vdr.c 1.137 2002/12/08 13:34:39 kls Exp $ + * $Id: vdr.c 1.139 2002/12/13 16:01:09 kls Exp $ */ #include <getopt.h> @@ -81,7 +81,7 @@ int main(int argc, char *argv[]) // Save terminal settings: struct termios savedTm; - tcgetattr(STDIN_FILENO, &savedTm); + bool HasStdin = tcgetpgrp(STDIN_FILENO) == getpid() && tcgetattr(STDIN_FILENO, &savedTm) == 0; // Initiate locale: @@ -386,7 +386,7 @@ int main(int argc, char *argv[]) new cLircRemote("/dev/lircd"); #endif #if defined(REMOTE_KBD) - if (!DaemonMode) + if (!DaemonMode && HasStdin) new cKbdRemote; #endif Interface->LearnKeys(); @@ -424,6 +424,7 @@ int main(int argc, char *argv[]) time_t LastActivity = 0; int MaxLatencyTime = 0; bool ForceShutdown = false; + bool UserShutdown = false; if (WatchdogTimeout > 0) { dsyslog("setting watchdog timer to %d seconds", WatchdogTimeout); @@ -539,6 +540,7 @@ int main(int argc, char *argv[]) ForceShutdown = true; } LastActivity = 1; // not 0, see below! + UserShutdown = true; break; default: break; } @@ -647,7 +649,7 @@ int main(int argc, char *argv[]) Interface->Info(tr("Editing process finished")); } } - if (!Interact && ((!cRecordControls::Active() && !cCutter::Active() && !Interface->HasSVDRPConnection()) || ForceShutdown)) { + if (!Interact && ((!cRecordControls::Active() && !cCutter::Active() && (!Interface->HasSVDRPConnection() || UserShutdown)) || ForceShutdown)) { time_t Now = time(NULL); if (Now - LastActivity > ACTIVITYTIMEOUT) { // Shutdown: @@ -665,12 +667,13 @@ int main(int argc, char *argv[]) else LastActivity = 1; } - bool UserShutdown = key == kPower; if (UserShutdown && Next && Delta <= Setup.MinEventTimeout * 60 && !ForceShutdown) { char *buf; asprintf(&buf, tr("Recording in %d minutes, shut down anyway?"), Delta / 60); if (Interface->Confirm(buf)) ForceShutdown = true; + else + UserShutdown = false; free(buf); } if (!Next || Delta > Setup.MinEventTimeout * 60 || ForceShutdown) { @@ -694,6 +697,7 @@ int main(int argc, char *argv[]) signal(SIGALRM, SIG_IGN); } LastActivity = time(NULL); // don't try again too soon + UserShutdown = false; continue; // skip the rest of the housekeeping for now } } @@ -724,7 +728,8 @@ int main(int argc, char *argv[]) isyslog("exiting"); if (SysLogLevel > 0) closelog(); - tcsetattr(STDIN_FILENO, TCSANOW, &savedTm); + if (HasStdin) + tcsetattr(STDIN_FILENO, TCSANOW, &savedTm); if (cThread::EmergencyExit()) { esyslog("emergency exit!"); return 1; |