aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/vfb/InitOutput.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-06-11 14:16:16 +0000
committermarha <marha@users.sourceforge.net>2010-06-11 14:16:16 +0000
commitd1e4f4b8546c7955c66dd023bfd6ef437db9d21d (patch)
tree529985e77bfc95aa95fe5b540e8f42b0ef041206 /xorg-server/hw/vfb/InitOutput.c
parent13919cf85a6ca41d97238de13344aba59e0f7680 (diff)
parent4c61bf84b11e26e6f22648668c95ea760a379163 (diff)
downloadvcxsrv-d1e4f4b8546c7955c66dd023bfd6ef437db9d21d.tar.gz
vcxsrv-d1e4f4b8546c7955c66dd023bfd6ef437db9d21d.tar.bz2
vcxsrv-d1e4f4b8546c7955c66dd023bfd6ef437db9d21d.zip
svn merge ^/branches/released .
Diffstat (limited to 'xorg-server/hw/vfb/InitOutput.c')
-rw-r--r--xorg-server/hw/vfb/InitOutput.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/xorg-server/hw/vfb/InitOutput.c b/xorg-server/hw/vfb/InitOutput.c
index 30e68e5d3..0172f4fbf 100644
--- a/xorg-server/hw/vfb/InitOutput.c
+++ b/xorg-server/hw/vfb/InitOutput.c
@@ -389,8 +389,8 @@ ddxProcessArgument(int argc, char *argv[], int i)
return 0;
}
-static int cmapScrPrivateKeyIndex;
-static DevPrivateKey cmapScrPrivateKey = &cmapScrPrivateKeyIndex;
+static DevPrivateKeyRec cmapScrPrivateKeyRec;
+#define cmapScrPrivateKey (&cmapScrPrivateKeyRec)
#define GetInstalledColormap(s) ((ColormapPtr) dixLookupPrivate(&(s)->devPrivates, cmapScrPrivateKey))
#define SetInstalledColormap(s,c) (dixSetPrivate(&(s)->devPrivates, cmapScrPrivateKey, c))
@@ -401,7 +401,7 @@ vfbListInstalledColormaps(ScreenPtr pScreen, Colormap *pmaps)
/* By the time we are processing requests, we can guarantee that there
* is always a colormap installed */
*pmaps = GetInstalledColormap(pScreen)->mid;
- return (1);
+ return 1;
}
@@ -570,7 +570,7 @@ vfbAllocateMmappedFramebuffer(vfbScreenInfoPtr pvfb)
/* Extend the file to be the proper size */
- bzero(dummyBuffer, DUMMY_BUFFER_SIZE);
+ memset(dummyBuffer, 0, DUMMY_BUFFER_SIZE);
for (currentFileSize = 0;
currentFileSize < pvfb->sizeInBytes;
currentFileSize += writeThisTime)
@@ -811,6 +811,9 @@ vfbScreenInit(int index, ScreenPtr pScreen, int argc, char **argv)
int ret;
char *pbits;
+ if (!dixRegisterPrivateKey(&cmapScrPrivateKeyRec, PRIVATE_SCREEN, 0))
+ return FALSE;
+
if (dpix == 0)
dpix = 100;