diff options
author | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2021-01-29 11:43:41 +0100 |
---|---|---|
committer | kamel5 <vdr.kamel5 (at) gmx (dot) net> | 2021-01-29 11:49:32 +0100 |
commit | 990d88480c9392da73438d44d1a82b1290e307ef (patch) | |
tree | 32a7f07557fab30bb3d05bced8f5d8024df6a395 /displaychannel.c | |
parent | db33e4e175369e6f1e8f9dab69e4c43b95f54e96 (diff) | |
download | skin-nopacity-990d88480c9392da73438d44d1a82b1290e307ef.tar.gz skin-nopacity-990d88480c9392da73438d44d1a82b1290e307ef.tar.bz2 |
Optimize displaychannel
Diffstat (limited to 'displaychannel.c')
-rw-r--r-- | displaychannel.c | 33 |
1 files changed, 11 insertions, 22 deletions
diff --git a/displaychannel.c b/displaychannel.c index 349c3a5..84257db 100644 --- a/displaychannel.c +++ b/displaychannel.c @@ -8,13 +8,6 @@ #include <vdr/menu.h> cNopacityDisplayChannel::cNopacityDisplayChannel(cImageCache *imgCache, bool WithInfo) { - if (firstDisplay) { - imgCache->CreateCacheDelayed(); - firstDisplay = false; - doOutput = false; - return; - } else - doOutput = true; groupSep = false; present = NULL; following = NULL; @@ -25,28 +18,24 @@ cNopacityDisplayChannel::cNopacityDisplayChannel(cImageCache *imgCache, bool Wit FrameTime = FadeTime / 10; channelView = new cNopacityDisplayChannelView(imgCache); - if (!channelView->createOsd()) { - doOutput = false; - } else { - channelView->CreatePixmaps(); - channelView->DrawBackground(); - if (config.GetValue("displaySignalStrength")) { - channelView->DrawSignalMeter(); - } + channelView->createOsd(); + channelView->CreatePixmaps(); + channelView->DrawBackground(); + if (config.GetValue("displaySignalStrength")) { + channelView->DrawSignalMeter(); } } cNopacityDisplayChannel::~cNopacityDisplayChannel() { - if (!doOutput) - return; Cancel(-1); while (Active()) cCondWait::SleepMs(10); - delete channelView; + if (channelView) + delete channelView; } void cNopacityDisplayChannel::SetChannel(const cChannel *Channel, int Number) { - if (!doOutput) + if (!channelView) return; channelChange = true; @@ -88,7 +77,7 @@ void cNopacityDisplayChannel::SetChannel(const cChannel *Channel, int Number) { } void cNopacityDisplayChannel::SetEvents(const cEvent *Present, const cEvent *Following) { - if (!doOutput) + if (!channelView) return; present = Present; following = Following; @@ -114,7 +103,7 @@ void cNopacityDisplayChannel::SetProgressBar(const cEvent *present) { void cNopacityDisplayChannel::SetMessage(eMessageType Type, const char *Text) { - if (!doOutput) + if (!channelView) return; channelView->ClearChannelLogo(); channelView->ClearChannelName(); @@ -128,7 +117,7 @@ void cNopacityDisplayChannel::SetMessage(eMessageType Type, const char *Text) { } void cNopacityDisplayChannel::Flush(void) { - if (!doOutput) + if (!channelView) return; if (initial || channelChange) channelView->DrawDate(); |