summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Reufer <thomas@reufer.ch>2015-02-15 18:33:08 +0100
committerThomas Reufer <thomas@reufer.ch>2015-02-15 18:33:08 +0100
commit6693a1e8e7f76df81ab0fa01e235ac7a2ccfa5f8 (patch)
tree07314827be210a4ec061a63f44c71f583dc32d48
parentbeb7667ab18ee5231f5d0da1c30b02addafae57e (diff)
downloadvdr-plugin-rpihddevice-6693a1e8e7f76df81ab0fa01e235ac7a2ccfa5f8.tar.gz
vdr-plugin-rpihddevice-6693a1e8e7f76df81ab0fa01e235ac7a2ccfa5f8.tar.bz2
adapted cOvgRawOsd::Flush() to new cOsd::RenderPixmaps() of vdr-2.1.10
-rw-r--r--HISTORY1
-rw-r--r--ovgosd.c19
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<cPixmapMemory *>(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
{