1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Avoiding unnecessary OSD draw operations caused by the audio track description display in the ST:TNG skin's channel display

This commit is contained in:
Klaus Schmidinger 2005-08-15 11:21:14 +02:00
parent 8680d92136
commit 69c17e7101
3 changed files with 13 additions and 3 deletions

View File

@ -571,6 +571,8 @@ Oliver Endriss <o.endriss@gmx.de>
being learned overwriting the date/time in the 'classic' skin being learned overwriting the date/time in the 'classic' skin
for making cDvbOsd check available OSD memory at runtime for making cDvbOsd check available OSD memory at runtime
for making cEIT::cEIT() drop EPG events that have a zero start time or duration for making cEIT::cEIT() drop EPG events that have a zero start time or duration
for reporting an unnecessary OSD draw operation caused by the audio track description
display in the ST:TNG skin's channel display
Reinhard Walter Buchner <rw.buchner@freenet.de> Reinhard Walter Buchner <rw.buchner@freenet.de>
for adding some satellites to 'sources.conf' for adding some satellites to 'sources.conf'

View File

@ -3672,7 +3672,7 @@ Video Disk Recorder Revision History
to Andreas Böttger). to Andreas Böttger).
- Fixed a memory leak in the SVDRP command LSTE (thanks to Stefan Huelswitt). - Fixed a memory leak in the SVDRP command LSTE (thanks to Stefan Huelswitt).
2005-08-14: Version 1.3.29 2005-08-15: Version 1.3.29
- Fixed a race condition in cTransfer (thanks to Klaus ??? for reporting this one). - Fixed a race condition in cTransfer (thanks to Klaus ??? for reporting this one).
In doing so, the 'active' variables used by the actual derived cThread classes In doing so, the 'active' variables used by the actual derived cThread classes
@ -3694,3 +3694,6 @@ Video Disk Recorder Revision History
problem with this). problem with this).
- Pressing Ok while entering a channel number now immediately switches to that - Pressing Ok while entering a channel number now immediately switches to that
channel, without waiting for further input. channel, without waiting for further input.
- Avoiding unnecessary OSD draw operations caused by the audio track description
display in the ST:TNG skin's channel display (thanks to Oliver Endriss for reporting
this).

View File

@ -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 1.14 2005/05/16 10:44:58 kls Exp $ * $Id: skinsttng.c 1.15 2005/08/15 11:14: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
@ -130,6 +130,7 @@ private:
bool message; bool message;
const cEvent *present; const cEvent *present;
int lastSeen; int lastSeen;
tTrackId lastTrackId;
static cBitmap bmTeletext, bmRadio, bmAudio, bmDolbyDigital, bmEncrypted, bmRecording; static cBitmap bmTeletext, bmRadio, bmAudio, bmDolbyDigital, bmEncrypted, bmRecording;
public: public:
cSkinSTTNGDisplayChannel(bool WithInfo); cSkinSTTNGDisplayChannel(bool WithInfo);
@ -151,6 +152,7 @@ cSkinSTTNGDisplayChannel::cSkinSTTNGDisplayChannel(bool WithInfo)
{ {
present = NULL; present = NULL;
lastSeen = -1; lastSeen = -1;
memset(&lastTrackId, 0, sizeof(lastTrackId));
const cFont *font = cFont::GetFont(fontOsd); const cFont *font = cFont::GetFont(fontOsd);
withInfo = WithInfo; withInfo = WithInfo;
lineHeight = font->Height(); lineHeight = font->Height();
@ -298,7 +300,10 @@ void cSkinSTTNGDisplayChannel::Flush(void)
osd->DrawText(x4 - w - 2, y7 - font->Height(date), date, Theme.Color(clrChannelDate), frameColor, font); osd->DrawText(x4 - w - 2, y7 - font->Height(date), date, Theme.Color(clrChannelDate), frameColor, font);
cDevice *Device = cDevice::PrimaryDevice(); cDevice *Device = cDevice::PrimaryDevice();
const tTrackId *Track = Device->GetTrack(Device->GetCurrentAudioTrack()); const tTrackId *Track = Device->GetTrack(Device->GetCurrentAudioTrack());
osd->DrawText(x3 + 2, y6, Track ? Track->description : "", Theme.Color(clrChannelName), frameColor, font, x4 - x3 - w - 4); if (!Track && *lastTrackId.description || Track && strcmp(lastTrackId.description, Track->description)) {
osd->DrawText(x3 + 2, y6, Track ? Track->description : "", Theme.Color(clrChannelName), frameColor, font, x4 - x3 - w - 4);
strn0cpy(lastTrackId.description, Track ? Track->description : "", sizeof(lastTrackId.description));
}
} }
int seen = 0; int seen = 0;