summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkamel5 <vdr.kamel5 (at) gmx (dot) net>2020-06-29 13:18:54 +0200
committerkamel5 <vdr.kamel5 (at) gmx (dot) net>2020-06-29 13:18:54 +0200
commit86fe497b629b79bc07ddc726341a42c9c9e02b00 (patch)
treea9d54cd00ded40537738bd3659ebfddddb664e04
parent00cc15b28821456f66110e698b74362b8829e12f (diff)
downloadskin-nopacity-86fe497b629b79bc07ddc726341a42c9c9e02b00.tar.gz
skin-nopacity-86fe497b629b79bc07ddc726341a42c9c9e02b00.tar.bz2
Change Locking in cNopacityDisplayChannelView::DrawEvents
-rw-r--r--displaychannelview.c28
1 files changed, 16 insertions, 12 deletions
diff --git a/displaychannelview.c b/displaychannelview.c
index 0556442..fcfc4f5 100644
--- a/displaychannelview.c
+++ b/displaychannelview.c
@@ -380,12 +380,14 @@ void cNopacityDisplayChannelView::DrawEvents(const cEvent *Present, const cEvent
bool present = !i ? true : false;
const cEvent *e = !i ? Present : Following;
if (e) {
+ {
LOCK_TIMERS_READ;
eTimerMatch TimerMatch = tmNone;
const cTimer *Timer = Timers->GetMatch(e, &TimerMatch);
if (Timer && Timer->HasFlags(tfActive) && TimerMatch == tmFull)
rec = true;
- DrawEPGInfo(e, present, rec);
+ }
+ DrawEPGInfo(e, present, rec);
}
}
}
@@ -398,14 +400,14 @@ void cNopacityDisplayChannelView::DrawEPGInfo(const cEvent *e, bool present, boo
cString strSeen("");
if (present) {
if (config.GetValue("progressCurrentSchedule") == 0) {
- int seen = (int)(time(NULL) - e->StartTime())/60;
- strSeen = cString::sprintf("%d/%dmin", seen, e->Duration()/60);
+ int seen = (int)(time(NULL) - e->StartTime()) / 60;
+ strSeen = cString::sprintf("%d/%dmin", seen, e->Duration() / 60);
} else if (config.GetValue("progressCurrentSchedule") == 1) {
- int remaining = (int)(e->EndTime() - time(NULL))/60;
- strSeen = cString::sprintf("-%d/%dmin", remaining, e->Duration()/60);
+ int remaining = (int)(e->EndTime() - time(NULL)) / 60;
+ strSeen = cString::sprintf("-%d/%dmin", remaining, e->Duration() / 60);
}
} else {
- strSeen = cString::sprintf("%dmin", e->Duration()/60);
+ strSeen = cString::sprintf("%dmin", e->Duration() / 60);
}
int startTimeWidth = fontManager->channelEPG->Width(*startTime);
@@ -415,7 +417,7 @@ void cNopacityDisplayChannelView::DrawEPGInfo(const cEvent *e, bool present, boo
int widthRecIcon = 0;
if (recording) {
- widthRecIcon = fontManager->channelEPGSmall->Width(" REC ") + indent/2;
+ widthRecIcon = fontManager->channelEPGSmall->Width(" REC ") + indent / 2;
}
int spaceEPGText = geoManager->channelContentWidth - seenWidth
- startTimeWidth - 3 * indent - widthRecIcon
@@ -450,11 +452,13 @@ void cNopacityDisplayChannelView::DrawEPGInfo(const cEvent *e, bool present, boo
//Recording Icon
if (recording) {
- tColor clrRecIcon = (present)?Theme.Color(clrRecNow):Theme.Color(clrRecNext);
- tColor clrRecIconText = (present)?Theme.Color(clrRecNowFont):Theme.Color(clrRecNextFont);
- pixmapEPGInfo->DrawRectangle(cRect(xEPG, yEPG, widthRecIcon - indent/2, lineHeight), clrRecIcon);
- int xRecText = xEPG + (widthRecIcon - indent/2 - fontManager->channelEPGSmall->Width("REC"))/2;
- int yRecText = yEPG + (lineHeight - fontManager->channelEPGSmall->Height())/2;
+ tColor clrRecIcon = (present) ? Theme.Color(clrRecNow)
+ : Theme.Color(clrRecNext);
+ tColor clrRecIconText = (present) ? Theme.Color(clrRecNowFont)
+ : Theme.Color(clrRecNextFont);
+ pixmapEPGInfo->DrawRectangle(cRect(xEPG, yEPG, widthRecIcon - indent / 2, lineHeight), clrRecIcon);
+ int xRecText = xEPG + (widthRecIcon - indent / 2 - fontManager->channelEPGSmall->Width("REC")) / 2;
+ int yRecText = yEPG + (lineHeight - fontManager->channelEPGSmall->Height()) / 2;
pixmapEPGInfo->DrawText(cPoint(xRecText, yRecText), "REC", clrRecIconText, clrRecIcon, fontManager->channelEPGSmall);
}
}