From b239e8e2baa8334180eecfc07e1a83ee255fb1b2 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sat, 22 May 2004 14:06:36 +0200 Subject: Fixed the OSD alignment in the SPU decoder --- CONTRIBUTORS | 3 +++ HISTORY | 2 ++ dvbspu.c | 9 +++++++-- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 3ae19e55..897b66a6 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -980,3 +980,6 @@ Drazen Dupor Prakash K. Cheemplavam for fixing some issues with gcc 3.4 + +Miko Wohlgemuth + for reporting a problem with the OSD alignment in the SPU decoder diff --git a/HISTORY b/HISTORY index 1b7a027c..4b879945 100644 --- a/HISTORY +++ b/HISTORY @@ -2821,3 +2821,5 @@ Video Disk Recorder Revision History can be called with a time_t value to get the day of week for that time. - When processing XPM data, the color name "None" is no mapped to #00000000, which is "fully transparent" (suggested by Sascha Volkenandt). +- Fixed the OSD alignment in the SPU decoder (thanks to Miko Wohlgemuth for reporting + this one and helping to test the fix). 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 @@ -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; } -- cgit v1.2.3