summaryrefslogtreecommitdiff
path: root/render.c
diff options
context:
space:
mode:
authorlordjaxom <lordjaxom>2004-06-01 21:02:41 +0000
committerlordjaxom <lordjaxom>2004-06-01 21:02:41 +0000
commite535cdbe09d9c13d79cd6722aafca5798b7d1e35 (patch)
tree640a6597a28e3f548a469b3c19e681d48a0622dc /render.c
parent37b57e7872214cc59119faf29bd058362504b3f6 (diff)
downloadvdr-plugin-text2skin-e535cdbe09d9c13d79cd6722aafca5798b7d1e35.tar.gz
vdr-plugin-text2skin-e535cdbe09d9c13d79cd6722aafca5798b7d1e35.tar.bz2
- fixed possible segfault when showing language logo (happened when channelv0.0.1-rc3
was not available) - fixed some memory leaks - fixed "too many colors used in palette" warning for non-imlib-users
Diffstat (limited to 'render.c')
-rw-r--r--render.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/render.c b/render.c
index f4485d7..c317a82 100644
--- a/render.c
+++ b/render.c
@@ -1,5 +1,5 @@
/*
- * $Id: render.c,v 1.14 2004/06/01 17:25:38 lordjaxom Exp $
+ * $Id: render.c,v 1.15 2004/06/01 21:02:38 lordjaxom Exp $
*/
#include "render.h"
@@ -195,7 +195,7 @@ void cText2SkinRender::DrawBackground(const POINT &Pos, const SIZE &Size, const
}
if (image)
- mOsd->DrawBitmap(Pos.x, Pos.y, bm);
+ DrawBitmap(mOsd, Pos.x, Pos.y, bm);
else
mOsd->DrawRectangle(Pos.x, Pos.y, Pos.x + Size.w - 1, Pos.y + Size.h - 1, Bg ? *Bg : 0);
}
@@ -209,7 +209,7 @@ void cText2SkinRender::DrawImage(const POINT &Pos, const SIZE &Size, const tColo
if (Bg) bm.SetColor(0, *Bg);
if (Fg) bm.SetColor(1, *Fg);
//mOsd->DrawRectangle(Pos.x, Pos.y, Pos.x + Size.w - 1, Pos.y + Size.h - 1, bm.Color(0));
- mOsd->DrawBitmap(Pos.x, Pos.y, bm);
+ DrawBitmap(mOsd, Pos.x, Pos.y, bm);
}
free(p);
}
@@ -323,8 +323,10 @@ void cText2SkinRender::DisplayLanguage(cText2SkinItem *Item) {
++i;
}
printf("\n");
- string path = Item->Path() + "/" + tracks[current] + "." + Item->Type();
- DrawImage(Item->Pos(), Item->Size(), Item->Bg(), Item->Fg(), path);
+ if (current < i) {
+ string path = Item->Path() + "/" + tracks[current] + "." + Item->Type();
+ DrawImage(Item->Pos(), Item->Size(), Item->Bg(), Item->Fg(), path);
+ }
}
}
@@ -353,6 +355,7 @@ void cText2SkinRender::DisplayTime(cText2SkinItem *Item) {
char *text = strdup(DayDateTime(time(NULL)));
text[18] = '\0';
DrawText(Item->Pos(), Item->Size(), Item->Fg(), ItemText(Item, text + 13), Item->Font(), Item->Align());
+ free(text);
}
void cText2SkinRender::DisplayChannelNumberName(cText2SkinItem *Item) {