summaryrefslogtreecommitdiff
path: root/displaychannel.c
diff options
context:
space:
mode:
Diffstat (limited to 'displaychannel.c')
-rw-r--r--displaychannel.c35
1 files changed, 20 insertions, 15 deletions
diff --git a/displaychannel.c b/displaychannel.c
index 2a13f06..e1e70b8 100644
--- a/displaychannel.c
+++ b/displaychannel.c
@@ -236,22 +236,22 @@ void cLCARSNGDisplayChannel::DrawBlinkingRec(void)
{
bool rec = cRecordControls::Active();
- if (initial || On != lastOn) {
- int x = xc13;
- 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);
- lastOn = On;
- }
-
if (rec) {
- if (!Running())
+ if (!Running()) {
Start();
+ On = true;
+ }
}
else {
- if (Running()) {
+ if (Running())
Cancel(3);
- On = false;
- }
+ On = false;
+ }
+ if (initial || On != lastOn) {
+ int x = xc13;
+ 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);
+ lastOn = On;
}
}
@@ -443,11 +443,16 @@ void cLCARSNGDisplayChannel::SetPositioner(const cPositioner *Positioner)
void cLCARSNGDisplayChannel::Action(void)
{
+ int i = 0;
while (Running()) {
- On = !On;
- DrawBlinkingRec();
- if (osd) osd->Flush();
- cCondWait::SleepMs(1000);
+ i++;
+ if (i > 9) {
+ i = 0;
+ On = !On;
+ DrawBlinkingRec();
+ if (osd) osd->Flush();
+ }
+ cCondWait::SleepMs(100);
}
}