[PATCH 3/5] xvfb: make MAXSCREENS run-time configurable
Tiago Vignatti
tiago.vignatti at nokia.com
Thu Apr 8 08:06:35 PDT 2010
Signed-off-by: Tiago Vignatti <tiago.vignatti at nokia.com>
---
hw/vfb/InitOutput.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/hw/vfb/InitOutput.c b/hw/vfb/InitOutput.c
index e15de33..f339262 100644
--- a/hw/vfb/InitOutput.c
+++ b/hw/vfb/InitOutput.c
@@ -105,7 +105,7 @@ typedef struct
} vfbScreenInfo, *vfbScreenInfoPtr;
static int vfbNumScreens;
-static vfbScreenInfo vfbScreens[MAXSCREENS];
+static vfbScreenInfo *vfbScreens;
static Bool vfbPixmapDepths[33];
#ifdef HAS_MMAP
static char *pfbdir = NULL;
@@ -125,6 +125,8 @@ static Pixel vfbBlackpix;
static Pixel vfbWhitePix;
static unsigned int vfbLinebias;
+static ColormapPtr *InstalledMaps;
+
#define swapcopy16(_dst, _src) \
if (needswap) { CARD16 _s = _src; cpswaps(_s, _dst); } \
else _dst = _src;
@@ -479,8 +481,6 @@ ddxProcessArgument(int argc, char *argv[], int i)
return 0;
}
-static ColormapPtr InstalledMaps[MAXSCREENS];
-
static int
vfbListInstalledColormaps(ScreenPtr pScreen, Colormap *pmaps)
{
@@ -1001,6 +1001,10 @@ InitOutput(ScreenInfo *screenInfo, int argc, char **argv)
int NumFormats = 0;
static Bool firstTime = TRUE;
+
+ MAXSCREENSALLOC_FATAL(vfbScreens);
+ MAXSCREENSALLOC_FATAL(InstalledMaps);
+
vfbProcessScreen();
vfbProcessPixdepths();
vfbProcessBlackpixel();
--
1.6.0.4
More information about the xorg-devel
mailing list