summaryrefslogtreecommitdiffstats
path: root/pnmshow.c
diff options
context:
space:
mode:
authordscho <dscho>2001-09-24 22:02:28 +0000
committerdscho <dscho>2001-09-24 22:02:28 +0000
commit5c438e3fb2d98f6aa36b58610ed9d871a41cf6f1 (patch)
tree32384646ca0bfcd2240ef1152fb605934b17da56 /pnmshow.c
parentfa85c12aa9f552aeafca4099467439d4cf434b79 (diff)
downloadlibvncserver-5c438e3fb2d98f6aa36b58610ed9d871a41cf6f1.zip
libvncserver-5c438e3fb2d98f6aa36b58610ed9d871a41cf6f1.tar.gz
bugfix: cursor (works now without xcursor encoding)
Diffstat (limited to 'pnmshow.c')
-rw-r--r--pnmshow.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/pnmshow.c b/pnmshow.c
index 0f29d90..d06eeb3 100644
--- a/pnmshow.c
+++ b/pnmshow.c
@@ -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 */
OpenPOWER on IntegriCloud