mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Fixed setting the date in the channel display of the classic and sttng skins, to avoid unnecessary OSD access
This commit is contained in:
parent
df0e2f0dc8
commit
5f9f793d7b
@ -1449,6 +1449,8 @@ Marco Schl
|
||||
an example ~cMyReceiver() in PLUGINS.html (thanks to Marco Schlüßler).
|
||||
for fixing checking compatibility mode for old subtitles plugin
|
||||
for a patch that was used to implement handling of DVB-S2
|
||||
for fixing setting the date in the channel display of the classic and sttng skins,
|
||||
to avoid unnecessary OSD access
|
||||
|
||||
Jürgen Schmitz <j.schmitz@web.de>
|
||||
for reporting a bug in displaying the current channel when switching via the SVDRP
|
||||
|
2
HISTORY
2
HISTORY
@ -5603,3 +5603,5 @@ Video Disk Recorder Revision History
|
||||
accessing file handles after they have become invalid (thanks to Reinhard
|
||||
Nissl for reporting an invalid access when ending VDR, and to Deti Fliegl for
|
||||
a patch that was used to implement StopSectionHandler()).
|
||||
- Fixed setting the date in the channel display of the classic and sttng skins,
|
||||
to avoid unnecessary OSD access (thanks to Marco Schlüßler).
|
||||
|
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: skinclassic.c 1.19 2008/01/13 12:38:00 kls Exp $
|
||||
* $Id: skinclassic.c 1.20 2008/02/10 10:01:13 kls Exp $
|
||||
*/
|
||||
|
||||
#include "skinclassic.h"
|
||||
@ -77,6 +77,7 @@ private:
|
||||
int lineHeight;
|
||||
int timeWidth;
|
||||
bool message;
|
||||
cString lastDate;
|
||||
public:
|
||||
cSkinClassicDisplayChannel(bool WithInfo);
|
||||
virtual ~cSkinClassicDisplayChannel();
|
||||
@ -113,6 +114,7 @@ void cSkinClassicDisplayChannel::SetChannel(const cChannel *Channel, int Number)
|
||||
{
|
||||
osd->DrawRectangle(0, 0, osd->Width() - 1, lineHeight - 1, Theme.Color(clrBackground));
|
||||
osd->DrawText(2, 0, ChannelString(Channel, Number), Theme.Color(clrChannelName), Theme.Color(clrBackground), cFont::GetFont(fontOsd));
|
||||
lastDate = NULL;
|
||||
}
|
||||
|
||||
void cSkinClassicDisplayChannel::SetEvents(const cEvent *Present, const cEvent *Following)
|
||||
@ -147,9 +149,12 @@ void cSkinClassicDisplayChannel::Flush(void)
|
||||
{
|
||||
if (!message) {
|
||||
cString date = DayDateTime();
|
||||
const cFont *font = cFont::GetFont(fontSml);
|
||||
int w = font->Width(date);
|
||||
osd->DrawText(osd->Width() - w - 2, 0, date, Theme.Color(clrChannelDate), Theme.Color(clrBackground), cFont::GetFont(fontSml), w);
|
||||
if (!lastDate || strcmp(date, lastDate)) {
|
||||
const cFont *font = cFont::GetFont(fontSml);
|
||||
int w = font->Width(date);
|
||||
osd->DrawText(osd->Width() - w - 2, 0, date, Theme.Color(clrChannelDate), Theme.Color(clrBackground), cFont::GetFont(fontSml), w);
|
||||
lastDate = date;
|
||||
}
|
||||
}
|
||||
osd->Flush();
|
||||
}
|
||||
|
10
skinsttng.c
10
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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user