diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2008-02-10 10:10:44 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2008-02-10 10:10:44 +0100 |
commit | 5f9f793d7b629888f2f729a088c6ee8c33ad042b (patch) | |
tree | 2ae6b1cde65b9d9af210c78c750b7cefe472abc2 /skinsttng.c | |
parent | df0e2f0dc8f4fbd31faa6c207931adde4dbe2f0c (diff) | |
download | vdr-5f9f793d7b629888f2f729a088c6ee8c33ad042b.tar.gz vdr-5f9f793d7b629888f2f729a088c6ee8c33ad042b.tar.bz2 |
Fixed setting the date in the channel display of the classic and sttng skins, to avoid unnecessary OSD access
Diffstat (limited to 'skinsttng.c')
-rw-r--r-- | skinsttng.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/skinsttng.c b/skinsttng.c index 4f576a7c..54638864 100644 --- a/skinsttng.c +++ b/skinsttng.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: skinsttng.c 1.21 2007/06/17 13:51:56 kls Exp $ + * $Id: skinsttng.c 1.22 2008/02/10 10:05:40 kls Exp $ */ // Star Trek: The Next Generation® is a registered trademark of Paramount Pictures @@ -129,6 +129,7 @@ private: tColor frameColor; bool message; const cEvent *present; + cString lastDate; int lastSeen; tTrackId lastTrackId; static cBitmap bmTeletext, bmRadio, bmAudio, bmDolbyDigital, bmEncrypted, bmRecording; @@ -307,7 +308,10 @@ void cSkinSTTNGDisplayChannel::Flush(void) const cFont *font = cFont::GetFont(fontSml); cString date = DayDateTime(); int w = font->Width(date); - osd->DrawText(x4 - w - 2, y7 - font->Height(), date, Theme.Color(clrChannelDate), frameColor, font, w); + if (!lastDate || strcmp(date, lastDate)) { + osd->DrawText(x4 - w - 2, y7 - font->Height(), date, Theme.Color(clrChannelDate), frameColor, font, w); + lastDate = date; + } cDevice *Device = cDevice::PrimaryDevice(); const tTrackId *Track = Device->GetTrack(Device->GetCurrentAudioTrack()); if (!Track && *lastTrackId.description || Track && strcmp(lastTrackId.description, Track->description)) { @@ -325,7 +329,7 @@ void cSkinSTTNGDisplayChannel::Flush(void) if (seen != lastSeen) { osd->DrawRectangle(x1 + Gap, y3, x1 + Gap + ScrollWidth - 1, y4 - 1, Theme.Color(clrChannelTimebarRest)); if (seen) - osd->DrawRectangle(x1 + Gap, y3, x1 + Gap + ScrollWidth - 1, y3 + seen, Theme.Color(clrChannelTimebarSeen)); + osd->DrawRectangle(x1 + Gap, y3, x1 + Gap + ScrollWidth - 1, y3 + seen, Theme.Color(clrChannelTimebarSeen)); lastSeen = seen; } } |