summaryrefslogtreecommitdiff
path: root/dvbspu.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2004-05-22 14:06:36 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2004-05-22 14:06:36 +0200
commitb239e8e2baa8334180eecfc07e1a83ee255fb1b2 (patch)
treecd55ffd62f8bbf0470a9fedf230cf5aad1b9cc00 /dvbspu.c
parent8eff25b8de89fb536b7cd78d25af8907e615e605 (diff)
downloadvdr-b239e8e2baa8334180eecfc07e1a83ee255fb1b2.tar.gz
vdr-b239e8e2baa8334180eecfc07e1a83ee255fb1b2.tar.bz2
Fixed the OSD alignment in the SPU decoder
Diffstat (limited to 'dvbspu.c')
-rw-r--r--dvbspu.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/dvbspu.c b/dvbspu.c
index a7af8ee1..184e6863 100644
--- a/dvbspu.c
+++ b/dvbspu.c
@@ -8,7 +8,7 @@
*
* parts of this file are derived from the OMS program.
*
- * $Id: dvbspu.c 1.6 2004/04/30 13:45:02 kls Exp $
+ * $Id: dvbspu.c 1.7 2004/05/22 14:02:32 kls Exp $
*/
#include <assert.h>
@@ -321,8 +321,13 @@ int cDvbSpuDecoder::ScaleYres(int value)
void cDvbSpuDecoder::DrawBmp(sDvbSpuRect & size, cBitmap * bmp)
{
- tArea Area = { size.x1, size.y1, size.x2, size.y2, 2 };
+ int x2 = size.x2;
+ while ((x2 - size.x1 + 1) & 0x03)
+ x2++;
+ tArea Area = { size.x1, size.y1, x2, size.y2, 2 };
osd->SetAreas(&Area, 1);
+ if (x2 > size.x2)
+ osd->DrawRectangle(size.x2 + 1, size.y1, x2, size.y2, clrTransparent);
osd->DrawBitmap(size.x1, size.y1, *bmp);
delete bmp;
}