summaryrefslogtreecommitdiff
path: root/vdr.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2005-08-20 11:24:42 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2005-08-20 11:24:42 +0200
commit7683e67826be4c23d882565face22dad287a11f6 (patch)
tree94269d707b0a12be293ebf184a097dc3b15a2c5e /vdr.c
parent101ee309e5883b42055ec0eeb3d73c6ade468b95 (diff)
downloadvdr-7683e67826be4c23d882565face22dad287a11f6.tar.gz
vdr-7683e67826be4c23d882565face22dad287a11f6.tar.bz2
Improved responsiveness inside CAM menus
Diffstat (limited to 'vdr.c')
-rw-r--r--vdr.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/vdr.c b/vdr.c
index f58d02bf..c8f57a2b 100644
--- a/vdr.c
+++ b/vdr.c
@@ -22,7 +22,7 @@
*
* The project's page is at http://www.cadsoft.de/vdr
*
- * $Id: vdr.c 1.209 2005/07/31 11:25:16 kls Exp $
+ * $Id: vdr.c 1.210 2005/08/20 11:24:42 kls Exp $
*/
#include <getopt.h>
@@ -63,6 +63,8 @@
#define SHUTDOWNWAIT 300 // seconds to wait in user prompt before automatic shutdown
#define MANUALSTART 600 // seconds the next timer must be in the future to assume manual start
#define CHANNELSAVEDELTA 600 // seconds before saving channels.conf after automatic modifications
+#define LASTCAMMENUTIMEOUT 3 // seconds to run the main loop 'fast' after a CAM menu has been closed
+ // in order to react on a possible new CAM menu as soon as possible
#define EXIT(v) { ExitCode = (v); goto Exit; }
@@ -389,6 +391,7 @@ int main(int argc, char *argv[])
int PreviousChannelIndex = 0;
time_t LastChannelChanged = time(NULL);
time_t LastActivity = 0;
+ time_t LastCamMenu = 0;
int MaxLatencyTime = 0;
bool ForceShutdown = false;
bool UserShutdown = false;
@@ -660,11 +663,16 @@ int main(int argc, char *argv[])
if (!Menu && Recordings.NeedsUpdate())
Recordings.Load();
// CAM control:
- if (!Menu && !cOsd::IsOpen())
+ if (!Menu && !cOsd::IsOpen()) {
Menu = CamControl();
+ if (Menu)
+ LastCamMenu = 0;
+ else if (!LastCamMenu)
+ LastCamMenu = time(NULL);
+ }
// User Input:
cOsdObject *Interact = Menu ? Menu : cControl::Control();
- eKeys key = Interface->GetKey(!Interact || !Interact->NeedsFastResponse());
+ eKeys key = Interface->GetKey((!Interact || !Interact->NeedsFastResponse()) && time(NULL) - LastCamMenu > LASTCAMMENUTIMEOUT);
if (NORMALKEY(key) != kNone) {
EITScanner.Activity();
LastActivity = time(NULL);