From 136f061aaf2528cab7117bc1f5459a7930ccc1c8 Mon Sep 17 00:00:00 2001 From: lordjaxom Date: Sun, 5 Jun 2005 21:39:02 +0000 Subject: =?UTF-8?q?-=20patch=20for=20PresentRemaining=20by=20Bj=C3=B6rn=20?= =?UTF-8?q?(VDR-Portal)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- display.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/display.c b/display.c index a21bc90..433d537 100644 --- a/display.c +++ b/display.c @@ -1,5 +1,5 @@ /* - * $Id: display.c,v 1.22 2005/05/30 13:03:13 lordjaxom Exp $ + * $Id: display.c,v 1.23 2005/06/05 21:39:02 lordjaxom Exp $ */ #include "render.h" @@ -184,10 +184,12 @@ cxType cText2SkinDisplayChannel::GetTokenData(const txToken &Token) : (cxType)false; case tPresentRemaining: - return mPresent != NULL - ? (cxType)DurationType((mPresent->Duration() - (time(NULL) - mPresent->StartTime())) - * FRAMESPERSEC, Token.Attrib.Text) - : (cxType)false; + if (mPresent != NULL && time(NULL) - mPresent->StartTime() + <= mPresent->Duration()) { + return (cxType)DurationType((mPresent->Duration() - (time(NULL) - mPresent->StartTime())) + * FRAMESPERSEC, Token.Attrib.Text); + } + return false; case tPresentTitle: return mPresent != NULL -- cgit v1.2.3