diff options
author | dscho <dscho> | 2001-09-24 22:02:28 +0000 |
---|---|---|
committer | dscho <dscho> | 2001-09-24 22:02:28 +0000 |
commit | 5c438e3fb2d98f6aa36b58610ed9d871a41cf6f1 (patch) | |
tree | 32384646ca0bfcd2240ef1152fb605934b17da56 /pnmshow.c | |
parent | fa85c12aa9f552aeafca4099467439d4cf434b79 (diff) | |
download | libtdevnc-5c438e3fb2d98f6aa36b58610ed9d871a41cf6f1.tar.gz libtdevnc-5c438e3fb2d98f6aa36b58610ed9d871a41cf6f1.zip |
bugfix: cursor (works now without xcursor encoding)
Diffstat (limited to 'pnmshow.c')
-rw-r--r-- | pnmshow.c | 17 |
1 files changed, 12 insertions, 5 deletions
@@ -1,7 +1,6 @@ #include <stdio.h> #include "rfb.h" -#define XK_MISCELLANY -#include "keysymdef.h" +#include "keysym.h" void HandleKey(Bool down,KeySym key,rfbClientPtr cl) { @@ -52,12 +51,20 @@ int main(int argc,char** argv) /* allocate picture and read it */ rfbScreen->frameBuffer = (char*)malloc(width*height*4); fread(rfbScreen->frameBuffer,width*3,height,in); + fclose(in); /* correct the format to 4 bytes instead of 3 */ for(i=width*height-1;i>=0;i--) { - rfbScreen->frameBuffer[i*4+3]=rfbScreen->frameBuffer[i*3+2]; - rfbScreen->frameBuffer[i*4+2]=rfbScreen->frameBuffer[i*3+1]; - rfbScreen->frameBuffer[i*4+1]=rfbScreen->frameBuffer[i*3+0]; + rfbScreen->frameBuffer[i*4+2]=rfbScreen->frameBuffer[i*3+0]; + rfbScreen->frameBuffer[i*4+1]=rfbScreen->frameBuffer[i*3+1]; + rfbScreen->frameBuffer[i*4+0]=rfbScreen->frameBuffer[i*3+2]; + } + + for(i=0;i<200;i++) { + rfbScreen->frameBuffer[i*4+i*width*4]=0; + rfbScreen->frameBuffer[i*4+i*width*4+1]=0; + rfbScreen->frameBuffer[i*4+i*width*4+2]=0; + rfbScreen->frameBuffer[i*4+i*width*4+3]=0; } /* run event loop */ |