85 lines
2.1 KiB
Diff
85 lines
2.1 KiB
Diff
--- vnc-4_1-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc.use-fb 2005-02-28 12:59:09.000000000 +0000
|
|
+++ vnc-4_1-unixsrc/unix/xc/programs/Xserver/vnc/Xvnc/xvnc.cc 2005-03-04 16:13:19.000000000 +0000
|
|
@@ -48,8 +48,12 @@
|
|
#include "X11/Xos.h"
|
|
#include "scrnintstr.h"
|
|
#include "servermd.h"
|
|
+#ifdef VNC_USE_FB
|
|
+#include "fb.h"
|
|
+#else
|
|
#define PSZ 8
|
|
#include "cfb.h"
|
|
+#endif
|
|
#include "mi.h"
|
|
#include "mibstore.h"
|
|
#include "colormapst.h"
|
|
@@ -73,6 +77,7 @@
|
|
#undef public
|
|
#undef xor
|
|
#undef and
|
|
+#ifndef VNC_USE_FB
|
|
extern Bool cfb16ScreenInit(ScreenPtr, pointer, int, int, int, int, int);
|
|
extern Bool cfb32ScreenInit(ScreenPtr, pointer, int, int, int, int, int);
|
|
extern Bool cfb16CreateGC(GCPtr);
|
|
@@ -83,6 +88,7 @@
|
|
unsigned long, char*);
|
|
extern void cfb32GetImage(DrawablePtr, int, int, int, int, unsigned int,
|
|
unsigned long, char*);
|
|
+#endif
|
|
}
|
|
|
|
#define XVNCVERSION "Free Edition 4.1"
|
|
@@ -482,7 +488,7 @@
|
|
}
|
|
#endif
|
|
|
|
-
|
|
+#ifndef VNC_USE_FB
|
|
static Bool vfbMultiDepthCreateGC(GCPtr pGC)
|
|
{
|
|
switch (vfbBitsPerPixel(pGC->depth))
|
|
@@ -541,6 +547,7 @@
|
|
break;
|
|
}
|
|
}
|
|
+#endif
|
|
|
|
static ColormapPtr InstalledMaps[MAXSCREENS];
|
|
|
|
@@ -811,6 +818,11 @@
|
|
defaultColorVisualClass
|
|
= (pvfb->bitsPerPixel > 8) ? TrueColor : PseudoColor;
|
|
|
|
+#ifdef VNC_USE_FB
|
|
+ if (!fbScreenInit(pScreen, pbits, pvfb->width, pvfb->height,
|
|
+ dpi, dpi, pvfb->paddedWidth, pvfb->bitsPerPixel))
|
|
+ return FALSE;
|
|
+#else
|
|
switch (pvfb->bitsPerPixel)
|
|
{
|
|
case 1:
|
|
@@ -838,6 +850,7 @@
|
|
pScreen->CreateGC = vfbMultiDepthCreateGC;
|
|
pScreen->GetImage = vfbMultiDepthGetImage;
|
|
pScreen->GetSpans = vfbMultiDepthGetSpans;
|
|
+#endif
|
|
|
|
pScreen->InstallColormap = vfbInstallColormap;
|
|
pScreen->UninstallColormap = vfbUninstallColormap;
|
|
@@ -883,6 +896,9 @@
|
|
}
|
|
}
|
|
|
|
+#ifdef VNC_USE_FB
|
|
+ ret = fbCreateDefColormap(pScreen);
|
|
+#else
|
|
if (pvfb->bitsPerPixel == 1)
|
|
{
|
|
ret = mfbCreateDefColormap(pScreen);
|
|
@@ -891,6 +907,7 @@
|
|
{
|
|
ret = cfbCreateDefColormap(pScreen);
|
|
}
|
|
+#endif
|
|
|
|
miSetZeroLineBias(pScreen, pvfb->lineBias);
|