From 6693a1e8e7f76df81ab0fa01e235ac7a2ccfa5f8 Mon Sep 17 00:00:00 2001 From: Thomas Reufer Date: Sun, 15 Feb 2015 18:33:08 +0100 Subject: adapted cOvgRawOsd::Flush() to new cOsd::RenderPixmaps() of vdr-2.1.10 --- HISTORY | 1 + ovgosd.c | 19 +++++++++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/HISTORY b/HISTORY index aeb7e09..0bd6fc9 100644 --- a/HISTORY +++ b/HISTORY @@ -2,6 +2,7 @@ VDR Plugin 'rpihddevice' Revision History ----------------------------------------- - fixed: + - adapted cOvgRawOsd::Flush() to new cOsd::RenderPixmaps() of vdr-2.1.10 - fixed calculation of string height (reported by Klaus Schmidinger) - additionally set number of in/out channels when setting up audio resampler - don't clear audio PTS when parser shrinks the packet buffer diff --git a/ovgosd.c b/ovgosd.c index 5959cdc..0bc1323 100644 --- a/ovgosd.c +++ b/ovgosd.c @@ -1275,8 +1275,23 @@ public: if (IsTrueColor()) { LOCK_PIXMAPS; - while (cPixmapMemory *pm = RenderPixmaps()) - m_ovg->DoCmd(new cOvgCmdDrawPixmap(Left(), Top(), pm)); + while (cPixmapMemory *pm = + dynamic_cast(RenderPixmaps())) + { + if (tColor* argb = MALLOC(tColor, + pm->DrawPort().Width() * pm->DrawPort().Height())) + { + memcpy(argb, pm->Data(), sizeof(tColor) * + pm->DrawPort().Width() * pm->DrawPort().Height()); + + m_ovg->DoCmd(new cOvgCmdDrawBitmap( + Left() + pm->ViewPort().Left(), + Top() + pm->ViewPort().Top(), + pm->DrawPort().Width(), pm->DrawPort().Height(), + argb)); + } + DestroyPixmap(pm); + } } else { -- cgit v1.2.3