mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Keeping signal display from slowing things down during heavy zapping
This commit is contained in:
parent
edb85b014c
commit
61a9b09403
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: skinsttng.c 2.9 2011/06/12 14:40:50 kls Exp $
|
* $Id: skinsttng.c 2.10 2011/06/12 15:20:59 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Star Trek: The Next Generation® is a registered trademark of Paramount Pictures
|
// Star Trek: The Next Generation® is a registered trademark of Paramount Pictures
|
||||||
@ -139,6 +139,7 @@ private:
|
|||||||
int lastDeviceNumber;
|
int lastDeviceNumber;
|
||||||
int lastSignalStrength;
|
int lastSignalStrength;
|
||||||
int lastSignalQuality;
|
int lastSignalQuality;
|
||||||
|
time_t lastSignalDisplay;
|
||||||
tTrackId lastTrackId;
|
tTrackId lastTrackId;
|
||||||
static cBitmap bmTeletext, bmRadio, bmAudio, bmDolbyDigital, bmEncrypted, bmRecording;
|
static cBitmap bmTeletext, bmRadio, bmAudio, bmDolbyDigital, bmEncrypted, bmRecording;
|
||||||
public:
|
public:
|
||||||
@ -164,6 +165,7 @@ cSkinSTTNGDisplayChannel::cSkinSTTNGDisplayChannel(bool WithInfo)
|
|||||||
lastDeviceNumber = -1;
|
lastDeviceNumber = -1;
|
||||||
lastSignalStrength = -1;
|
lastSignalStrength = -1;
|
||||||
lastSignalQuality = -1;
|
lastSignalQuality = -1;
|
||||||
|
lastSignalDisplay = 0;
|
||||||
memset(&lastTrackId, 0, sizeof(lastTrackId));
|
memset(&lastTrackId, 0, sizeof(lastTrackId));
|
||||||
const cFont *font = cFont::GetFont(fontOsd);
|
const cFont *font = cFont::GetFont(fontOsd);
|
||||||
withInfo = WithInfo;
|
withInfo = WithInfo;
|
||||||
@ -282,6 +284,7 @@ void cSkinSTTNGDisplayChannel::SetChannel(const cChannel *Channel, int Number)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
osd->DrawText(x3 + TextFrame, y0, ChannelString(Channel, Number), Theme.Color(clrChannelName), frameColor, cFont::GetFont(fontOsd), x - x3 - TextFrame);
|
osd->DrawText(x3 + TextFrame, y0, ChannelString(Channel, Number), Theme.Color(clrChannelName), frameColor, cFont::GetFont(fontOsd), x - x3 - TextFrame);
|
||||||
|
lastSignalDisplay = time(NULL); // don't get slowed down during heavy zapping
|
||||||
}
|
}
|
||||||
|
|
||||||
void cSkinSTTNGDisplayChannel::SetEvents(const cEvent *Present, const cEvent *Following)
|
void cSkinSTTNGDisplayChannel::SetEvents(const cEvent *Present, const cEvent *Following)
|
||||||
@ -338,6 +341,7 @@ void cSkinSTTNGDisplayChannel::Flush(void)
|
|||||||
osd->DrawText(x3 + TextFrame, y6, Track ? Track->description : "", Theme.Color(clrChannelName), frameColor, font, x4 - x3 - w - 2 * TextFrame);
|
osd->DrawText(x3 + TextFrame, y6, Track ? Track->description : "", Theme.Color(clrChannelName), frameColor, font, x4 - x3 - w - 2 * TextFrame);
|
||||||
strn0cpy(lastTrackId.description, Track ? Track->description : "", sizeof(lastTrackId.description));
|
strn0cpy(lastTrackId.description, Track ? Track->description : "", sizeof(lastTrackId.description));
|
||||||
}
|
}
|
||||||
|
if (time(NULL) != lastSignalDisplay) {
|
||||||
int DeviceNumber = cDevice::ActualDevice()->DeviceNumber() + 1;
|
int DeviceNumber = cDevice::ActualDevice()->DeviceNumber() + 1;
|
||||||
int SignalStrength = cDevice::ActualDevice()->SignalStrength();
|
int SignalStrength = cDevice::ActualDevice()->SignalStrength();
|
||||||
int SignalQuality = cDevice::ActualDevice()->SignalQuality();
|
int SignalQuality = cDevice::ActualDevice()->SignalQuality();
|
||||||
@ -368,6 +372,8 @@ void cSkinSTTNGDisplayChannel::Flush(void)
|
|||||||
lastSignalStrength = SignalStrength;
|
lastSignalStrength = SignalStrength;
|
||||||
lastSignalQuality = SignalQuality;
|
lastSignalQuality = SignalQuality;
|
||||||
}
|
}
|
||||||
|
lastSignalDisplay = time(NULL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
int seen = 0;
|
int seen = 0;
|
||||||
if (present) {
|
if (present) {
|
||||||
|
Loading…
Reference in New Issue
Block a user