From 095539cd8c13a18b86f33eec817908cb10c2efbc Mon Sep 17 00:00:00 2001 From: dscho Date: Tue, 2 Oct 2001 02:44:03 +0000 Subject: support for server side colour maps, fix for non-pthread, support for 3bpp --- main.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index d33b7a0..b709bb7 100644 --- a/main.c +++ b/main.c @@ -31,7 +31,7 @@ #include #include "rfb.h" -#include "region.h" +#include "sraRegion.h" #ifdef HAVE_PTHREADS pthread_mutex_t logMutex; @@ -75,10 +75,14 @@ void rfbMarkRegionAsModified(rfbScreenInfoPtr rfbScreen,sraRegionPtr modRegion) iterator=rfbGetClientIterator(rfbScreen); while((cl=rfbClientIteratorNext(iterator))) { +#ifdef HAVE_PTHREADS pthread_mutex_lock(&cl->updateMutex); +#endif sraRgnOr(cl->modifiedRegion,modRegion); +#ifdef HAVE_PTHREADS pthread_cond_signal(&cl->updateCond); pthread_mutex_unlock(&cl->updateMutex); +#endif } rfbReleaseClientIterator(iterator); @@ -353,7 +357,9 @@ rfbScreenInfoPtr rfbGetScreen(int argc,char** argv, format->depth = rfbScreen->depth; format->bigEndian = rfbEndianTest?FALSE:TRUE; format->trueColour = TRUE; - rfbScreen->colourMap = NULL; + rfbScreen->colourMap.count = 0; + rfbScreen->colourMap.is16 = 0; + rfbScreen->colourMap.data.bytes = NULL; if(bytesPerPixel == 8) { format->redMax = 7; -- cgit v1.1