summaryrefslogtreecommitdiff
path: root/ffont.c
diff options
context:
space:
mode:
authoranbr <vdr07@deltab.de>2014-05-04 11:23:50 +0200
committeranbr <vdr07@deltab.de>2014-05-04 11:23:50 +0200
commit3d87cc0b6a062a39b9385f33bdec88ee25967776 (patch)
tree3c907421cacd9ee7bd8d56e4e85f986d3b45bef1 /ffont.c
parentf110173bb35f84b8b6bca4dfd84b910b7deac1ef (diff)
downloadvdr-plugin-targavfd-3d87cc0b6a062a39b9385f33bdec88ee25967776.tar.gz
vdr-plugin-targavfd-3d87cc0b6a062a39b9385f33bdec88ee25967776.tar.bz2
Dual-Line-Mode: Eclipse long channel names (Closes: #1815)
Diffstat (limited to 'ffont.c')
-rw-r--r--ffont.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ffont.c b/ffont.c
index 8aa15b0..952f891 100644
--- a/ffont.c
+++ b/ffont.c
@@ -206,7 +206,7 @@ int cVFDFont::DrawText(cVFDBitmap *Bitmap, int x, int y, const char *s, int Widt
uchar *buffer = g->Bitmap();
int symWidth = g->Width();
if (Width && x + symWidth + g->Left() + kerning - 1 > Width)
- return 1; // we don't draw partial characters
+ return x; // we don't draw partial characters
if (x + symWidth + g->Left() + kerning > 0) {
for (int row = 0; row < g->Rows(); row++) {
for (int pitch = 0; pitch < g->Pitch(); pitch++) {
@@ -222,11 +222,11 @@ int cVFDFont::DrawText(cVFDBitmap *Bitmap, int x, int y, const char *s, int Widt
}
x += g->AdvanceX() + kerning;
if (x > Bitmap->Width() - 1)
- return 1;
+ return x - (g->AdvanceX() + kerning);
}
- return 0;
+ return x;
}
- return -1;
+ return 0;
}