From 2666d38fb9dfe4072f072e9abc2acbcaa24320e8 Mon Sep 17 00:00:00 2001 From: Christian Gmeiner Date: Tue, 29 Sep 2009 17:25:49 +0200 Subject: make use of new spuencoder --- dxr3osd.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/dxr3osd.c b/dxr3osd.c index f4ac63b..85740e0 100644 --- a/dxr3osd.c +++ b/dxr3osd.c @@ -150,6 +150,25 @@ void cDxr3Osd::Flush() if (!Active()) return; + int i = 0; + while (GetBitmap(i) != NULL) { + i++; + } + + int x1 = 0, y1 = 0, x2 = 0, y2 = 0; + if (!GetBitmap(0)->Dirty(x1, y1, x2, y2)) { + return; + } + + if (i == 1) { + cSpuEncoder::instance()->encode(GetBitmap(0), Top(), Left()); + shown = true; + GetBitmap(0)->Clean(); + return; + } else { + dsyslog("TODO: add support for multi bitmaps"); + } + #if 0 if (last->Elapsed() < cDxr3ConfigData::instance()->GetOsdFlushRate()) return; -- cgit v1.2.3