summaryrefslogtreecommitdiff
path: root/menu.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2018-04-14 10:24:41 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2018-04-14 10:24:41 +0200
commitc057e057f91d4d909d2105d5530187ca6ab17f2c (patch)
treefecddfa780dfc44ad42847265855ebea7858a5c3 /menu.c
parentfb03134411200478be4ae2c72266dd76b074b77a (diff)
downloadvdr-c057e057f91d4d909d2105d5530187ca6ab17f2c.tar.gz
vdr-c057e057f91d4d909d2105d5530187ca6ab17f2c.tar.bz2
Fixed a high CPU load during replay with active progress display
Diffstat (limited to 'menu.c')
-rw-r--r--menu.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/menu.c b/menu.c
index 6527c43f..c8a557c1 100644
--- a/menu.c
+++ b/menu.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: menu.c 4.73 2018/04/09 09:20:03 kls Exp $
+ * $Id: menu.c 4.74 2018/04/14 10:24:41 kls Exp $
*/
#include "menu.h"
@@ -45,6 +45,7 @@
#define MAXWAITFORCAMMENU 10 // seconds to wait for the CAM menu to open
#define CAMMENURETRYTIMEOUT 3 // seconds after which opening the CAM menu is retried
#define CAMRESPONSETIMEOUT 5 // seconds to wait for a response from a CAM
+#define PROGRESSTIMEOUT 100 // milliseconds to wait before updating the replay progress display
#define MINFREEDISK 300 // minimum free disk space (in MB) required to start recording
#define NODISKSPACEDELTA 300 // seconds between "Not enough disk space to start recording!" messages
#define MAXCHNAMWIDTH 16 // maximum number of characters of channels' short names shown in schedules menus
@@ -5733,6 +5734,8 @@ void cReplayControl::ShowMode(void)
bool cReplayControl::ShowProgress(bool Initial)
{
int Current, Total;
+ if (!(Initial || updateTimer.TimedOut()))
+ return visible;
if (GetFrameNumber(Current, Total) && Total > 0) {
if (!visible) {
displayReplay = Skins.Current()->DisplayReplay(modeOnly);
@@ -5762,6 +5765,7 @@ bool cReplayControl::ShowProgress(bool Initial)
}
lastTotal = Total;
ShowMode();
+ updateTimer.Set(PROGRESSTIMEOUT);
return true;
}
return false;