From d77073256ae431c639f447a3d1ce166a62180bb9 Mon Sep 17 00:00:00 2001 From: Karl Melscher Date: Wed, 7 Mar 2018 15:39:54 +0100 Subject: More Blinking Rec changes --- lcarsng.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'lcarsng.c') diff --git a/lcarsng.c b/lcarsng.c index d91e434..95e765f 100644 --- a/lcarsng.c +++ b/lcarsng.c @@ -551,19 +551,20 @@ void cLCARSNGDisplayChannel::DrawSignal(void) void cLCARSNGDisplayChannel::DrawBlinkingRec(void) { bool rec = cRecordControls::Active(); - bool On; + bool On = false; int x = xc13; + int bt = 800; + x -= bmRecording.Width() + SymbolSpacing; if (rec) { - if (cTimeMs::Now() - Blink > 1000) { + if (cTimeMs::Now() - Blink > bt) { On = false; - if (cTimeMs::Now() - Blink > 2000) + if ((cTimeMs::Now() - Blink) / 2 > bt) Blink = cTimeMs::Now(); } else On = true; - x -= bmRecording.Width() + SymbolSpacing; - osd->DrawBitmap(x, yc11 + (yc12 - yc11 - bmRecording.Height()) / 2, bmRecording, Theme.Color(rec ? On ? clrChannelSymbolRecFg : clrChannelSymbolOff : clrChannelSymbolOff), rec ? On ? Theme.Color(clrChannelSymbolRecBg) : frameColor : frameColor); } + osd->DrawBitmap(x, yc11 + (yc12 - yc11 - bmRecording.Height()) / 2, bmRecording, Theme.Color(rec ? On ? clrChannelSymbolRecFg : clrChannelSymbolOff : clrChannelSymbolOff), rec ? On ? Theme.Color(clrChannelSymbolRecBg) : frameColor : frameColor); } void cLCARSNGDisplayChannel::SetChannel(const cChannel *Channel, int Number) @@ -579,7 +580,7 @@ void cLCARSNGDisplayChannel::SetChannel(const cChannel *Channel, int Number) if (Channel && !Channel->GroupSep()) { bool rec = cRecordControls::Active(); x -= bmRecording.Width() + SymbolSpacing; - osd->DrawBitmap(x, yc11 + (yc12 - yc11 - bmRecording.Height()) / 2, bmRecording, Theme.Color(rec ? clrChannelSymbolRecFg : clrChannelSymbolOff), rec ? Theme.Color(clrChannelSymbolRecBg) : frameColor); +// osd->DrawBitmap(x, yc11 + (yc12 - yc11 - bmRecording.Height()) / 2, bmRecording, Theme.Color(rec ? clrChannelSymbolRecFg : clrChannelSymbolOff), rec ? Theme.Color(clrChannelSymbolRecBg) : frameColor); x -= bmEncrypted.Width() + SymbolSpacing; osd->DrawBitmap(x, yc11 + (yc12 - yc11 - bmEncrypted.Height()) / 2, bmEncrypted, Theme.Color(Channel->Ca() ? clrChannelSymbolOn : clrChannelSymbolOff), frameColor); x -= bmDolbyDigital.Width() + SymbolSpacing; -- cgit v1.2.3