summaryrefslogtreecommitdiff
path: root/common.c
diff options
context:
space:
mode:
authormrwastl <mrwastl@users.sourceforge.net>2010-05-05 00:20:33 +0200
committermrwastl <mrwastl@users.sourceforge.net>2010-05-05 00:20:33 +0200
commit9b7c321b381c7a85eb7a05e4c41c21cb45ea8fa6 (patch)
treef1abbc324a0995249c079bc4105ba166b56df593 /common.c
parentf0ce22b6b9cfda828ef000d652a0f4e2dc24334d (diff)
downloadvdr-plugin-graphlcd-9b7c321b381c7a85eb7a05e4c41c21cb45ea8fa6.tar.gz
vdr-plugin-graphlcd-9b7c321b381c7a85eb7a05e4c41c21cb45ea8fa6.tar.bz2
ported DEFAULTFRAMESPERSECOND-patch from 0.1.x to 0.2.0
Diffstat (limited to 'common.c')
-rw-r--r--common.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/common.c b/common.c
index 8b03502..431600a 100644
--- a/common.c
+++ b/common.c
@@ -36,8 +36,13 @@ GLCD::cType DurationType(int Index, const std::string &Format)
char *res = result;
enum { normal, format } state = normal;
int n = 0;
+#if VDRVERSNUM >= 10701
+ int f = (Index % DEFAULTFRAMESPERSECOND) + 1;
+ int s = (Index / DEFAULTFRAMESPERSECOND);
+#else
int f = (Index % FRAMESPERSEC) + 1;
int s = (Index / FRAMESPERSEC);
+#endif
int m = s / 60 % 60;
int h = s / 3600;
s %= 60;