summaryrefslogtreecommitdiff
path: root/netosd.c
diff options
context:
space:
mode:
authorzwer <zwer@1f4bef6d-8e0a-0410-8695-e467da8aaccf>2006-05-07 22:33:35 +0000
committerzwer <zwer@1f4bef6d-8e0a-0410-8695-e467da8aaccf>2006-05-07 22:33:35 +0000
commit4523b067ff0c54132b4a3a385e4a1b21b19b6443 (patch)
treee918a1a6e097660ac9670bfda33ba83856428dd8 /netosd.c
parent49577f08861642c39d1490d5e156c9624133e9f4 (diff)
downloadvdr-plugin-ffnetdev-4523b067ff0c54132b4a3a385e4a1b21b19b6443.tar.gz
vdr-plugin-ffnetdev-4523b067ff0c54132b4a3a385e4a1b21b19b6443.tar.bz2
- add multi area OSD support. You can use all plugins and all skins.
git-svn-id: svn://svn.berlios.de/ffnetdev/trunk@16 1f4bef6d-8e0a-0410-8695-e467da8aaccf
Diffstat (limited to 'netosd.c')
-rw-r--r--netosd.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/netosd.c b/netosd.c
index 5bfdab6..87fec69 100644
--- a/netosd.c
+++ b/netosd.c
@@ -29,8 +29,8 @@ eOsdError cNetOSD::CanHandleAreas(const tArea *Areas, int NumAreas)
{
eOsdError Result = cOsd::CanHandleAreas(Areas, NumAreas);
if (Result == oeOk) {
- if (NumAreas > 1) // Handle only one big area (because we support VNC colour map mode)
- return oeTooManyAreas; // We cannot handle multiple areas having different colour maps. We need a single colourmap. Thus, only one area.
+ if (NumAreas > 7)
+ return oeTooManyAreas;
int TotalMemory = 0;
for (int i = 0; i < NumAreas; i++) {
if (Areas[i].bpp != 1 && Areas[i].bpp != 2 && Areas[i].bpp != 4 && Areas[i].bpp != 8)
@@ -48,31 +48,28 @@ eOsdError cNetOSD::CanHandleAreas(const tArea *Areas, int NumAreas)
return Result;
}
+
void cNetOSD::Flush(void)
{
cBitmap *Bitmap;
+ int x1=0, x2=0, y1=0, y2=0;
for (int i = 0; (Bitmap = GetBitmap(i)) != NULL; i++)
- {
- int x1=0, x2=0, y1=0, y2=0;
+ {
if (Bitmap->Dirty(x1, y1, x2, y2))
{
- // commit colors:
- int NumColors;
- const tColor *Colors = Bitmap->Colors(NumColors);
- if (Colors) {
- cOSDWorker::SendCMAP(NumColors , Colors);
- }
#ifdef DEBUG
fprintf(stderr, "[ffnetdev] NetOSD: Left: %d, Top: %d, X0: %d, Y0: %d, Width: %d, Height: %d\n",
Left(), Top(), Bitmap->X0(), Bitmap->Y0(), Bitmap->Width(), Bitmap->Height());
fprintf(stderr, "[ffnetdev] NetOSD: Dirty area x1: %d, y1: %d, x2: %d, y2: %d\n",x1,y1,x2,y2);
#endif
- // commit modified data:
- cOSDWorker::SendScreen(Bitmap->Width(), Left()+x1 +Bitmap->X0(), Top()+y1+Bitmap->Y0(), x2-x1+1, y2-y1+1, Bitmap->Data(x1, y1));
+ cOSDWorker::DrawBitmap(Left() + Bitmap->X0(), Top() + Bitmap->Y0(), *Bitmap);
+
}
Bitmap->Clean();
- }
+ }
+
+ cOSDWorker::SendScreen();
}