summaryrefslogtreecommitdiff
path: root/displaychannelview.c
diff options
context:
space:
mode:
authorkamel5 <kamel5 (at) gmx (dot) net>2018-05-06 14:20:31 +0200
committerkamel5 <kamel5 (at) gmx (dot) net>2018-05-06 14:20:31 +0200
commit7173b4e49936fc0e842ef629670cad8a2edf7fcb (patch)
tree3f642cca4b9d98f933bb4999c63b5ea2140fd480 /displaychannelview.c
parent40c59a6b4f8dae37d8684447e3ba0bb96ad56f57 (diff)
downloadskin-nopacity-7173b4e49936fc0e842ef629670cad8a2edf7fcb.tar.gz
skin-nopacity-7173b4e49936fc0e842ef629670cad8a2edf7fcb.tar.bz2
Optimize cNopacityDisplayChannelView::DrawEvents
Diffstat (limited to 'displaychannelview.c')
-rw-r--r--displaychannelview.c33
1 files changed, 11 insertions, 22 deletions
diff --git a/displaychannelview.c b/displaychannelview.c
index aac366a..79b1ad9 100644
--- a/displaychannelview.c
+++ b/displaychannelview.c
@@ -375,29 +375,18 @@ void cNopacityDisplayChannelView::ClearProgressBar(void) {
}
void cNopacityDisplayChannelView::DrawEvents(const cEvent *Present, const cEvent *Following) {
- if (Present) {
- bool recCurrent = false;
- {
- LOCK_TIMERS_READ;
- eTimerMatch TimerMatch = tmNone;
- const cTimer *Timer = Timers->GetMatch(Present, &TimerMatch);
- if (Timer && Timer->Recording()) {
- recCurrent = true;
- }
+ for (int i = 0; i < 2; i++) {
+ bool rec = false;
+ 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(Present, true, recCurrent);
- }
- if (Following) {
- bool recFollowing = false;
- {
- LOCK_TIMERS_READ;
- eTimerMatch TimerMatch = tmNone;
- const cTimer *Timer = Timers->GetMatch(Following, &TimerMatch);
- if (Timer && Timer->HasFlags(tfActive)) {
- recFollowing = true;
- }
- }
- DrawEPGInfo(Following, false, recFollowing);
}
}