summaryrefslogtreecommitdiff
path: root/skinlcars.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2013-01-25 14:57:30 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2013-01-25 14:57:30 +0100
commita9c9b76aeb8dbe8ab84477eb7a6b4efacbfdbed4 (patch)
tree5c8f4a15c50d004fa490b3d518860f906637e1f4 /skinlcars.c
parenta5426b58c66e95fe6c96df65d2bc8d66e0ae3d77 (diff)
downloadvdr-a9c9b76aeb8dbe8ab84477eb7a6b4efacbfdbed4.tar.gz
vdr-a9c9b76aeb8dbe8ab84477eb7a6b4efacbfdbed4.tar.bz2
Fixed a leftover progress display in the LCARS main menu when replay of a recording ends while the menu is open, and the live channel has no EPG information
Diffstat (limited to 'skinlcars.c')
-rw-r--r--skinlcars.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/skinlcars.c b/skinlcars.c
index 4550025c..42565b7d 100644
--- a/skinlcars.c
+++ b/skinlcars.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: skinlcars.c 2.17 2013/01/23 14:00:09 kls Exp $
+ * $Id: skinlcars.c 2.18 2013/01/25 14:54:11 kls Exp $
*/
// "Star Trek: The Next Generation"(R) is a registered trademark of Paramount Pictures,
@@ -457,7 +457,7 @@ void cSkinLCARSDisplayChannel::DrawTrack(void)
void cSkinLCARSDisplayChannel::DrawSeen(int Current, int Total)
{
- int Seen = min(xc07 - xc06, int((xc07 - xc06) * double(Current) / Total));
+ int Seen = (Total > 0) ? min(xc07 - xc06, int((xc07 - xc06) * double(Current) / Total)) : 0;
if (initial || Seen != lastSeen) {
int y0 = yc11 - ShowSeenExtent;
int y1 = yc11 + lineHeight / 2 - Gap / 2;
@@ -1343,6 +1343,7 @@ void cSkinLCARSDisplayMenu::DrawLive(const cChannel *Channel)
osd->DrawText(xa00, yt00, itoa(Channel->Number()), Theme.Color(clrChannelFrameFg), Theme.Color(clrChannelFrameBg), tallFont, xa02 - xa00, yt02 - yt00, taTop | taRight | taBorder);
osd->DrawText(xa03, yt00, Channel->Name(), Theme.Color(clrChannelName), Theme.Color(clrBackground), tallFont, xd00 - xa03, yd01 - yd00, taTop | taLeft);
lastChannel = Channel;
+ DrawSeen(0, 0);
}
// The current programme:
cSchedulesLock SchedulesLock;
@@ -1423,7 +1424,7 @@ void cSkinLCARSDisplayMenu::DrawInfo(const cEvent *Event, bool WithTime)
void cSkinLCARSDisplayMenu::DrawSeen(int Current, int Total)
{
- int Seen = min(xm08 - xm02, int((xm08 - xm02) * double(Current) / Total));
+ int Seen = (Total > 0) ? min(xm08 - xm02, int((xm08 - xm02) * double(Current) / Total)) : 0;
if (initial || Seen != lastSeen) {
int y0 = yc04 - ShowSeenExtent;
int y1 = yc04 + lineHeight / 2 - Gap / 2;