summaryrefslogtreecommitdiff
path: root/timer.c
diff options
context:
space:
mode:
authorlouis <louis.braun@gmx.de>2013-05-24 16:23:23 +0200
committerlouis <louis.braun@gmx.de>2013-05-24 16:23:23 +0200
commit9f47ab764efc83d8bf94f25c4badeb6e4c91c649 (patch)
treed919adf7613949f0107b968c2bf13736075c17fc /timer.c
parentc611e004582067640111ef2f023410025201157d (diff)
downloadvdr-plugin-tvguide-9f47ab764efc83d8bf94f25c4badeb6e4c91c649.tar.gz
vdr-plugin-tvguide-9f47ab764efc83d8bf94f25c4badeb6e4c91c649.tar.bz2
Version 0.0.4
Diffstat (limited to 'timer.c')
-rw-r--r--timer.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/timer.c b/timer.c
index cb1a438..1acd3bf 100644
--- a/timer.c
+++ b/timer.c
@@ -15,7 +15,11 @@ void cMyTime::Now() {
t = time(0);
tStart = t;
tStart = GetRounded();
- tEnd = tStart + (tvguideConfig.osdHeight - tvguideConfig.statusHeaderHeight - tvguideConfig.headerHeight - tvguideConfig.footerHeight)/tvguideConfig.minuteHeight*60;
+ if (tvguideConfig.displayMode == eVertical) {
+ tEnd = tStart + (tvguideConfig.osdHeight - tvguideConfig.statusHeaderHeight - tvguideConfig.channelHeaderHeight - tvguideConfig.footerHeight)/tvguideConfig.minutePixel*60;
+ } else if (tvguideConfig.displayMode == eHorizontal) {
+ tEnd = tStart + (tvguideConfig.osdWidth - tvguideConfig.channelHeaderWidth)/tvguideConfig.minutePixel*60;
+ }
}
void cMyTime::AddStep(int step) {
@@ -34,7 +38,11 @@ bool cMyTime::DelStep(int step) {
void cMyTime::SetTime(time_t newTime) {
tStart = newTime;
- tEnd = tStart + (tvguideConfig.osdHeight - tvguideConfig.statusHeaderHeight - tvguideConfig.headerHeight - tvguideConfig.footerHeight)/tvguideConfig.minuteHeight*60;
+ if (tvguideConfig.displayMode == eVertical) {
+ tEnd = tStart + (tvguideConfig.osdHeight - tvguideConfig.statusHeaderHeight - tvguideConfig.channelHeaderHeight - tvguideConfig.footerHeight)/tvguideConfig.minutePixel*60;
+ } else if (tvguideConfig.displayMode == eHorizontal) {
+ tEnd = tStart + (tvguideConfig.osdWidth - tvguideConfig.channelHeaderWidth)/tvguideConfig.minutePixel*60;
+ }
}
time_t cMyTime::getPrevPrimetime(time_t current) {