summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandreas 'randy' weinberger <vdr@smue.org>2010-02-28 12:50:31 +0100
committerandreas 'randy' weinberger <vdr@smue.org>2010-02-28 12:50:31 +0100
commit1065acffd6db2eca946e2a6693cd66bb14d0694a (patch)
tree07044785986de9ac65594d69e4c7650c4473c79d
parent2bd22158402ee800860f0c9c2ce8922f8aa0a82b (diff)
downloadvdr-plugin-graphlcd-1065acffd6db2eca946e2a6693cd66bb14d0694a.tar.gz
vdr-plugin-graphlcd-1065acffd6db2eca946e2a6693cd66bb14d0694a.tar.bz2
changed FRAMESPERSEC to DEFAULTFRAMESPERSECOND (vdr-1.7.x)
-rw-r--r--display.c15
-rw-r--r--state.c8
2 files changed, 23 insertions, 0 deletions
diff --git a/display.c b/display.c
index 82678a5..a4f98f7 100644
--- a/display.c
+++ b/display.c
@@ -382,10 +382,17 @@ void cGraphLCDDisplay::Action(void)
if (CurrTime != LastTime || update)
{
// but only, if something has changed
+#if VDRVERSNUM >= 10701
+ if (replay.total / DEFAULTFRAMESPERSECOND != replay.totalLast / DEFAULTFRAMESPERSECOND ||
+ replay.current / DEFAULTFRAMESPERSECOND != replay.currentLast / DEFAULTFRAMESPERSECOND ||
+ CurrTime/60 != LastTime/60 ||
+ update)
+#else
if (replay.total / FRAMESPERSEC != replay.totalLast / FRAMESPERSEC ||
replay.current / FRAMESPERSEC != replay.currentLast / FRAMESPERSEC ||
CurrTime/60 != LastTime/60 ||
update)
+#endif
{
timerclear(&UpdateAt);
update = false;
@@ -1330,14 +1337,22 @@ void cGraphLCDDisplay::DisplayProgramme()
bool cGraphLCDDisplay::IndexIsGreaterAsOneHour(int Index) const
{
+#if VDRVERSNUM >= 10701
+ int h = (Index / DEFAULTFRAMESPERSECOND) / 3600;
+#else
int h = (Index / FRAMESPERSEC) / 3600;
+#endif
return h > 0;
}
const char * cGraphLCDDisplay::IndexToMS(int Index) const
{
static char buffer[16];
+#if VDRVERSNUM >= 10701
+ int s = (Index / DEFAULTFRAMESPERSECOND);
+#else
int s = (Index / FRAMESPERSEC);
+#endif
int m = s / 60;
s %= 60;
snprintf(buffer, sizeof(buffer), "%02d:%02d", m, s);
diff --git a/state.c b/state.c
index fe76adb..34446a3 100644
--- a/state.c
+++ b/state.c
@@ -40,7 +40,11 @@ cGraphLCDState::cGraphLCDState(cGraphLCDDisplay * Display)
replay.control = NULL;
replay.mode = eReplayNormal;
replay.current = 0;
+#if VDRVERSNUM >= 10701
+ replay.currentLast = DEFAULTFRAMESPERSECOND;
+#else
replay.currentLast = FRAMESPERSEC;
+#endif
replay.total = 0;
replay.totalLast = 1;
@@ -303,7 +307,11 @@ void cGraphLCDState::Replaying(const cControl * Control, const char * Name, cons
replay.name = Name;
}
}
+#if VDRVERSNUM >= 10701
+ replay.currentLast = DEFAULTFRAMESPERSECOND;
+#else
replay.currentLast = FRAMESPERSEC;
+#endif
replay.totalLast = 1;
mutex.Unlock();
}