From 2c820a714bf99cc7cf6b02dd73608d1bf21971e4 Mon Sep 17 00:00:00 2001 From: dscho Date: Mon, 19 Nov 2001 17:16:39 +0000 Subject: [PATCH] tmp --- x11vnc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/x11vnc.c b/x11vnc.c index a9bb1d1..3ff868f 100644 --- a/x11vnc.c +++ b/x11vnc.c @@ -174,10 +174,9 @@ int main(int argc,char** argv) XColor color[256]; int i; screen->rfbServerFormat.trueColour = FALSE; - screen->colourMap = malloc(sizeof(rfbColourMap)); screen->colourMap.is16 = TRUE; - screen->colourMap.count = XQueryColors(dpy,DefaultColormap(dpy,xscreen),color,256); - screen->colourMap.data.shorts = malloc(6*screen->colourMap.count); + screen->colourMap.count = XQueryColors(dpy,DefaultColormap(dpy,xscreen),color,16); + screen->colourMap.data.shorts = (short*)malloc(3*sizeof(short)*screen->colourMap.count); for(i=0;icolourMap.count;i++) { screen->colourMap.data.shorts[i*6+0] = color[i].red; screen->colourMap.data.shorts[i*6+2] = color[i].green; @@ -241,7 +240,7 @@ int main(int argc,char** argv) } else if(screen->rfbClientHead && c++>updateCounter) { c=0; //fprintf(stderr,"*"); - if(!useSHM) + //if(!useSHM) framebufferImage->f.destroy_image(framebufferImage); getImage(screen->rfbServerFormat.bitsPerPixel,dpy,xscreen,&framebufferImage); checkForImageUpdates(screen,framebufferImage->data);