diff options
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | README | 4 | ||||
-rw-r--r-- | tabletrans24template.c | 8 |
3 files changed, 9 insertions, 5 deletions
@@ -44,6 +44,8 @@ libvncserver.a: $(OBJS) $(AR) cru $@ $(OBJS) $(RANLIB) $@ +translate.o: translate.c tableinit24.c tableinitcmtemplate.c tableinittctemplate.c tabletrans24template.c tabletranstemplate.c + example: example.o libvncserver.a $(CC) -o example example.o $(LIBS) @@ -164,9 +164,11 @@ ptrAddEvent(int buttonMask,int x,int y,rfbClientPtr cl) setXCutText(char* str,int len,rfbClientPtr cl) is called when the selection changes. -There is only one hook: +There are only two hooks: newClientHook(rfbClientPtr cl) 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: getCursorPtr(rfbClientPtr cl) diff --git a/tabletrans24template.c b/tabletrans24template.c index 0dee0d3..44a37cb 100644 --- a/tabletrans24template.c +++ b/tabletrans24template.c @@ -55,7 +55,7 @@ rfbTranslateWithSingleTable24to24 (char *table, rfbPixelFormat *in, { CARD8 *ip = (CARD8 *)iptr; CARD8 *op = (CARD8 *)optr; - int ipextra = bytesBetweenInputLines / 3 - width; + int ipextra = bytesBetweenInputLines - width * 3; CARD8 *opLineEnd; CARD8 *t = (CARD8 *)table; int shift = rfbEndianTest?0:8; @@ -94,7 +94,7 @@ rfbTranslateWithRGBTables24to24 (char *table, rfbPixelFormat *in, { CARD8 *ip = (CARD8 *)iptr; CARD8 *op = (CARD8 *)optr; - int ipextra = bytesBetweenInputLines / 3 - width; + int ipextra = bytesBetweenInputLines - width*3; CARD8 *opLineEnd; CARD8 *redTable = (CARD8 *)table; CARD8 *greenTable = redTable + 3*(in->redMax + 1); @@ -146,7 +146,7 @@ rfbTranslateWithSingleTable24toOUT (char *table, rfbPixelFormat *in, { CARD8 *ip = (CARD8 *)iptr; OUT_T *op = (OUT_T *)optr; - int ipextra = bytesBetweenInputLines / 3 - width; + int ipextra = bytesBetweenInputLines - width*3; OUT_T *opLineEnd; OUT_T *t = (OUT_T *)table; int shift = rfbEndianTest?0:8; @@ -179,7 +179,7 @@ rfbTranslateWithRGBTables24toOUT (char *table, rfbPixelFormat *in, { CARD8 *ip = (CARD8 *)iptr; OUT_T *op = (OUT_T *)optr; - int ipextra = bytesBetweenInputLines / 3 - width; + int ipextra = bytesBetweenInputLines - width*3; OUT_T *opLineEnd; OUT_T *redTable = (OUT_T *)table; OUT_T *greenTable = redTable + in->redMax + 1; |