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

Fixed signal display in case of a message

This commit is contained in:
Klaus Schmidinger 2011-06-12 14:40:50 +02:00
parent b0fd7ed933
commit edb85b014c

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 2.8 2011/06/02 12:54:43 kls Exp $ * $Id: skinsttng.c 2.9 2011/06/12 14:40:50 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
@ -338,20 +338,6 @@ 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));
} }
}
int seen = 0;
if (present) {
time_t t = time(NULL);
if (t > present->StartTime())
seen = min(y4 - y3 - 1, int((y4 - y3) * double(t - present->StartTime()) / present->Duration()));
}
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));
lastSeen = seen;
}
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();
@ -383,6 +369,19 @@ void cSkinSTTNGDisplayChannel::Flush(void)
lastSignalQuality = SignalQuality; lastSignalQuality = SignalQuality;
} }
} }
int seen = 0;
if (present) {
time_t t = time(NULL);
if (t > present->StartTime())
seen = min(y4 - y3 - 1, int((y4 - y3) * double(t - present->StartTime()) / present->Duration()));
}
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));
lastSeen = seen;
}
}
osd->Flush(); osd->Flush();
} }