From da85481fe0737ead0a0f6cc031d9d8ed23f89692 Mon Sep 17 00:00:00 2001 From: kamel5 Date: Thu, 3 May 2018 13:53:14 +0200 Subject: Repair "invalid lock sequence report" --- displaychannel.c | 30 ++++++++++-------------------- displaychannel.h | 1 + displaychannelview.c | 19 +++++++++++++++++++ displaychannelview.h | 1 + 4 files changed, 31 insertions(+), 20 deletions(-) diff --git a/displaychannel.c b/displaychannel.c index e90d180..f726358 100644 --- a/displaychannel.c +++ b/displaychannel.c @@ -90,30 +90,12 @@ void cNopacityDisplayChannel::SetEvents(const cEvent *Present, const cEvent *Fol if (!doOutput) return; present = Present; + following = Following; channelView->ClearProgressBar(); if (!groupSep) { channelView->DrawProgressbarBackground(); channelView->ClearEPGInfo(); } - if (Present) { - if (!groupSep) { - SetProgressBar(Present); - } - bool recCurrent = false; - eTimerMatch TimerMatch = tmNone; - LOCK_TIMERS_READ; - const cTimer *Timer = Timers->GetMatch(Present, &TimerMatch); - if (Timer && Timer->Recording()) { - recCurrent = true; - } - channelView->DrawEPGInfo(Present, true, recCurrent); - } - if (Following) { - bool recFollowing = Following->HasTimer(); - channelView->DrawEPGInfo(Following, false, recFollowing); - } - if (config.GetValue("displayPoster")) - channelView->DrawPoster(Present, initial); } void cNopacityDisplayChannel::SetProgressBar(const cEvent *present) { @@ -148,11 +130,19 @@ void cNopacityDisplayChannel::Flush(void) { if (initial || channelChange) channelView->DrawDate(); - if (present) { + if (present && !groupSep) { SetProgressBar(present); } else channelView->ClearProgressBar(); + if (!groupSep) { + channelView->ClearEPGInfo(); + channelView->DrawEvents(present, following); + } + + if (config.GetValue("displayPoster")) + channelView->DrawPoster(present, initial); + if (!groupSep) channelView->DrawScreenResolution(); else diff --git a/displaychannel.h b/displaychannel.h index 65b6884..2a56059 100644 --- a/displaychannel.h +++ b/displaychannel.h @@ -20,6 +20,7 @@ private: int currentLast; bool showSignal; const cEvent *present; + const cEvent *following; virtual void Action(void); void SetProgressBar(const cEvent *present); public: diff --git a/displaychannelview.c b/displaychannelview.c index 9c6a671..ece2edf 100644 --- a/displaychannelview.c +++ b/displaychannelview.c @@ -374,6 +374,25 @@ void cNopacityDisplayChannelView::ClearProgressBar(void) { pixmapProgressBar->Fill(clrTransparent); } +void cNopacityDisplayChannelView::DrawEvents(const cEvent *Present, const cEvent *Following) { + if (Present) { + bool recCurrent = false; + eTimerMatch TimerMatch = tmNone; + const cTimer *Timer; + { + LOCK_TIMERS_READ; + Timer = Timers->GetMatch(Present, &TimerMatch); + } + if (Timer && Timer->Recording()) { + recCurrent = true; + } + DrawEPGInfo(Present, true, recCurrent); + } + if (Following) { + bool recFollowing = Following->HasTimer(); + DrawEPGInfo(Following, false, recFollowing); + } +} void cNopacityDisplayChannelView::DrawEPGInfo(const cEvent *e, bool present, bool recording) { int indent = 20; diff --git a/displaychannelview.h b/displaychannelview.h index 7a3fd91..8a63bb5 100644 --- a/displaychannelview.h +++ b/displaychannelview.h @@ -50,6 +50,7 @@ public: void DrawProgressbarBackground(void); void DrawProgressBar(int Current, int Total); void ClearProgressBar(void); + void DrawEvents(const cEvent *Present, const cEvent *Following); void DrawEPGInfo(const cEvent *e, bool present, bool recording); void ClearEPGInfo(void); void DrawStatusIcons(const cChannel *Channel); -- cgit v1.2.3