summaryrefslogtreecommitdiff
path: root/lcarsng.c
diff options
context:
space:
mode:
authorKarl Melscher <kamel5@gmx.net>2018-03-07 15:08:56 +0100
committerKarl Melscher <kamel5@gmx.net>2018-03-07 15:08:56 +0100
commit50ca477a3ec610db3090310983d4ff96c194d850 (patch)
tree62152c7d8c3bcff682976697a48a7b8dff5165ac /lcarsng.c
parentd6db38f80369e63a97996cf38b40100a5de50bee (diff)
downloadskin-lcarsng-50ca477a3ec610db3090310983d4ff96c194d850.tar.gz
skin-lcarsng-50ca477a3ec610db3090310983d4ff96c194d850.tar.bz2
Fix for show audio track
Diffstat (limited to 'lcarsng.c')
-rw-r--r--lcarsng.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/lcarsng.c b/lcarsng.c
index 87cc3cd..4130e0c 100644
--- a/lcarsng.c
+++ b/lcarsng.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: skinlcars.c 3.3 2013/08/18 13:45:36 kls Exp $
+ * $Id: skinlcars.c 3.6 2013/11/16 13:20:19 kls Exp $
*/
// "Star Trek: The Next Generation"(R) is a registered trademark of Paramount Pictures,
@@ -495,7 +495,7 @@ void cLCARSNGDisplayChannel::DrawTrack(void)
{
cDevice *Device = cDevice::PrimaryDevice();
const tTrackId *Track = Device->GetTrack(Device->GetCurrentAudioTrack());
- if (!Track && *lastTrackId.description || Track && strcmp(lastTrackId.description, Track->description)) {
+ if (Track ? strcmp(lastTrackId.description, Track->description) : *lastTrackId.description) {
osd->DrawText(xc03, yc07, Track ? Track->description : "", Theme.Color(clrTrackName), Theme.Color(clrBackground), cFont::GetFont(fontOsd), xc07 - xc03);
strn0cpy(lastTrackId.description, Track ? Track->description : "", sizeof(lastTrackId.description));
}
@@ -1934,6 +1934,7 @@ cLCARSNGDisplayReplay::cLCARSNGDisplayReplay(bool ModeOnly)
frameColor = Theme.Color(clrReplayFrameBg);
lastCurrentWidth = 0;
lastTotalWidth = 0;
+ memset(&lastTrackId, 0, sizeof(lastTrackId));
int d = 5 * lineHeight;
xp00 = 0;
xp01 = xp00 + d / 2;
@@ -1964,8 +1965,6 @@ cLCARSNGDisplayReplay::cLCARSNGDisplayReplay(bool ModeOnly)
yp06 = yp08 - d / 4;
yp05 = yp09 - d / 2;
- memset(&lastTrackId, 0, sizeof(lastTrackId));
-
osd = CreateOsd(cOsd::OsdLeft(), cOsd::OsdTop() + cOsd::OsdHeight() - yp09, xp00, yp00 - lineHeight, xp15 - 1, yp09 - 1);
osd->DrawRectangle(xp00, yp00, xp15 - 1, yp09 - 1, modeOnly ? clrTransparent : Theme.Color(clrBackground));
// Rectangles:
@@ -2010,7 +2009,7 @@ void cLCARSNGDisplayReplay::DrawTrack(void)
{
cDevice *Device = cDevice::PrimaryDevice();
const tTrackId *Track = Device->GetTrack(Device->GetCurrentAudioTrack());
- if (!Track && *lastTrackId.description || Track && strcmp(lastTrackId.description, Track->description)) {
+ if (Track ? strcmp(lastTrackId.description, Track->description) : *lastTrackId.description) {
osd->DrawText(xp03, yp04, Track ? Track->description : "", Theme.Color(clrTrackName), Theme.Color(clrBackground), cFont::GetFont(fontOsd), xp07 - xp03);
strn0cpy(lastTrackId.description, Track ? Track->description : "", sizeof(lastTrackId.description));
}