Commit a7d66f23 authored by dscho's avatar dscho

fixed 24bit (update was garbled)

parent 87c12192
...@@ -44,6 +44,8 @@ libvncserver.a: $(OBJS) ...@@ -44,6 +44,8 @@ libvncserver.a: $(OBJS)
$(AR) cru $@ $(OBJS) $(AR) cru $@ $(OBJS)
$(RANLIB) $@ $(RANLIB) $@
translate.o: translate.c tableinit24.c tableinitcmtemplate.c tableinittctemplate.c tabletrans24template.c tabletranstemplate.c
example: example.o libvncserver.a example: example.o libvncserver.a
$(CC) -o example example.o $(LIBS) $(CC) -o example example.o $(LIBS)
......
...@@ -164,9 +164,11 @@ ptrAddEvent(int buttonMask,int x,int y,rfbClientPtr cl) ...@@ -164,9 +164,11 @@ ptrAddEvent(int buttonMask,int x,int y,rfbClientPtr cl)
setXCutText(char* str,int len,rfbClientPtr cl) setXCutText(char* str,int len,rfbClientPtr cl)
is called when the selection changes. is called when the selection changes.
There is only one hook: There are only two hooks:
newClientHook(rfbClientPtr cl) newClientHook(rfbClientPtr cl)
is called when a new client has connected. is called when a new client has connected.
displayHook
is called just before a frame buffer update is sent.
You can also override the following methods: You can also override the following methods:
getCursorPtr(rfbClientPtr cl) getCursorPtr(rfbClientPtr cl)
......
...@@ -55,7 +55,7 @@ rfbTranslateWithSingleTable24to24 (char *table, rfbPixelFormat *in, ...@@ -55,7 +55,7 @@ rfbTranslateWithSingleTable24to24 (char *table, rfbPixelFormat *in,
{ {
CARD8 *ip = (CARD8 *)iptr; CARD8 *ip = (CARD8 *)iptr;
CARD8 *op = (CARD8 *)optr; CARD8 *op = (CARD8 *)optr;
int ipextra = bytesBetweenInputLines / 3 - width; int ipextra = bytesBetweenInputLines - width * 3;
CARD8 *opLineEnd; CARD8 *opLineEnd;
CARD8 *t = (CARD8 *)table; CARD8 *t = (CARD8 *)table;
int shift = rfbEndianTest?0:8; int shift = rfbEndianTest?0:8;
...@@ -94,7 +94,7 @@ rfbTranslateWithRGBTables24to24 (char *table, rfbPixelFormat *in, ...@@ -94,7 +94,7 @@ rfbTranslateWithRGBTables24to24 (char *table, rfbPixelFormat *in,
{ {
CARD8 *ip = (CARD8 *)iptr; CARD8 *ip = (CARD8 *)iptr;
CARD8 *op = (CARD8 *)optr; CARD8 *op = (CARD8 *)optr;
int ipextra = bytesBetweenInputLines / 3 - width; int ipextra = bytesBetweenInputLines - width*3;
CARD8 *opLineEnd; CARD8 *opLineEnd;
CARD8 *redTable = (CARD8 *)table; CARD8 *redTable = (CARD8 *)table;
CARD8 *greenTable = redTable + 3*(in->redMax + 1); CARD8 *greenTable = redTable + 3*(in->redMax + 1);
...@@ -146,7 +146,7 @@ rfbTranslateWithSingleTable24toOUT (char *table, rfbPixelFormat *in, ...@@ -146,7 +146,7 @@ rfbTranslateWithSingleTable24toOUT (char *table, rfbPixelFormat *in,
{ {
CARD8 *ip = (CARD8 *)iptr; CARD8 *ip = (CARD8 *)iptr;
OUT_T *op = (OUT_T *)optr; OUT_T *op = (OUT_T *)optr;
int ipextra = bytesBetweenInputLines / 3 - width; int ipextra = bytesBetweenInputLines - width*3;
OUT_T *opLineEnd; OUT_T *opLineEnd;
OUT_T *t = (OUT_T *)table; OUT_T *t = (OUT_T *)table;
int shift = rfbEndianTest?0:8; int shift = rfbEndianTest?0:8;
...@@ -179,7 +179,7 @@ rfbTranslateWithRGBTables24toOUT (char *table, rfbPixelFormat *in, ...@@ -179,7 +179,7 @@ rfbTranslateWithRGBTables24toOUT (char *table, rfbPixelFormat *in,
{ {
CARD8 *ip = (CARD8 *)iptr; CARD8 *ip = (CARD8 *)iptr;
OUT_T *op = (OUT_T *)optr; OUT_T *op = (OUT_T *)optr;
int ipextra = bytesBetweenInputLines / 3 - width; int ipextra = bytesBetweenInputLines - width*3;
OUT_T *opLineEnd; OUT_T *opLineEnd;
OUT_T *redTable = (OUT_T *)table; OUT_T *redTable = (OUT_T *)table;
OUT_T *greenTable = redTable + in->redMax + 1; OUT_T *greenTable = redTable + in->redMax + 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment