From 9b7c321b381c7a85eb7a05e4c41c21cb45ea8fa6 Mon Sep 17 00:00:00 2001 From: mrwastl Date: Wed, 5 May 2010 00:20:33 +0200 Subject: ported DEFAULTFRAMESPERSECOND-patch from 0.1.x to 0.2.0 --- skinconfig.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'skinconfig.c') diff --git a/skinconfig.c b/skinconfig.c index 423429d..9e4b2ce 100644 --- a/skinconfig.c +++ b/skinconfig.c @@ -359,13 +359,25 @@ GLCD::cType cGraphLCDSkinConfig::GetToken(const GLCD::tSkinToken & Token) case tokPresentEndDateTime: return TimeType(event.startTime + event.duration, Token.Attrib.Text); case tokPresentDuration: +#if VDRVERSNUM >= 10701 + return DurationType(event.duration * DEFAULTFRAMESPERSECOND, Token.Attrib.Text); +#else return DurationType(event.duration * FRAMESPERSEC, Token.Attrib.Text); +#endif case tokPresentProgress: +#if VDRVERSNUM >= 10701 + return DurationType((time(NULL) - event.startTime) * DEFAULTFRAMESPERSECOND, Token.Attrib.Text); +#else return DurationType((time(NULL) - event.startTime) * FRAMESPERSEC, Token.Attrib.Text); +#endif case tokPresentRemaining: if ((time(NULL) - event.startTime) < event.duration) { +#if VDRVERSNUM >= 10701 + return DurationType((event.duration - (time(NULL) - event.startTime)) * DEFAULTFRAMESPERSECOND, Token.Attrib.Text); +#else return DurationType((event.duration - (time(NULL) - event.startTime)) * FRAMESPERSEC, Token.Attrib.Text); +#endif } return false; case tokPresentTitle: @@ -392,7 +404,11 @@ GLCD::cType cGraphLCDSkinConfig::GetToken(const GLCD::tSkinToken & Token) case tokFollowingEndDateTime: return TimeType(event.startTime + event.duration, Token.Attrib.Text); case tokFollowingDuration: +#if VDRVERSNUM >= 10701 + return DurationType(event.duration * DEFAULTFRAMESPERSECOND, Token.Attrib.Text); +#else return DurationType(event.duration * FRAMESPERSEC, Token.Attrib.Text); +#endif case tokFollowingTitle: return event.title; case tokFollowingShortText: -- cgit v1.2.3