diff options
author | dscho <dscho> | 2002-01-17 09:33:17 +0000 |
---|---|---|
committer | dscho <dscho> | 2002-01-17 09:33:17 +0000 |
commit | 7b90c44708b6b3096419af747e4a4f3470d2d4db (patch) | |
tree | 4214a827c7505e97c6863d00d00b07f82b770d5a /font.c | |
parent | ba66518fa044cf164cc3d963a248002c45f29538 (diff) | |
download | libtdevnc-7b90c44708b6b3096419af747e4a4f3470d2d4db.tar.gz libtdevnc-7b90c44708b6b3096419af747e4a4f3470d2d4db.zip |
correct BackChannel handling, compile cleanups
Diffstat (limited to 'font.c')
-rw-r--r-- | font.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -4,8 +4,8 @@ int rfbDrawChar(rfbScreenInfoPtr rfbScreen,rfbFontDataPtr font, int x,int y,unsigned char c,Pixel col) { int i,j,width,height; - unsigned char d; unsigned char* data=font->data+font->metaData[c*5]; + unsigned char d=*data; int rowstride=rfbScreen->paddedWidthInBytes; int bpp=rfbScreen->rfbServerFormat.bitsPerPixel/8; char *colour=(char*)&col; @@ -49,8 +49,8 @@ int rfbDrawCharWithClip(rfbScreenInfoPtr rfbScreen,rfbFontDataPtr font, Pixel col,Pixel bcol) { int i,j,width,height; - unsigned char d; unsigned char* data=font->data+font->metaData[c*5]; + unsigned char d; int rowstride=rfbScreen->paddedWidthInBytes; int bpp=rfbScreen->rfbServerFormat.bitsPerPixel/8,extra_bytes=0; char* colour=(char*)&col; @@ -73,6 +73,7 @@ int rfbDrawCharWithClip(rfbScreenInfoPtr rfbScreen,rfbFontDataPtr font, if(y2<y+height) height-=y+height-y2; if(x2<x+width) { extra_bytes+=(x1+width)/8-(x+width-x2+7)/8; width-=x+width-x2; } + d=*data; for(j=y1;j<height;j++) { if((x1&7)!=0) d=data[-1]; /* TODO: check if in this case extra_bytes is correct! */ |