From f0a78163edb50e4b0e3ca2959e6f807828c23bc2 Mon Sep 17 00:00:00 2001 From: biocrasher Date: Mon, 31 Jul 2006 14:10:16 +0000 Subject: incorrect cursor drawing on ppc fixed git-svn-id: https://recordmydesktop.svn.sourceforge.net/svnroot/recordmydesktop/trunk@37 f606c939-3180-4ac9-a4b8-4b8779d57d0a --- recordmydesktop/src/make_dummy_pointer.c | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) (limited to 'recordmydesktop/src') diff --git a/recordmydesktop/src/make_dummy_pointer.c b/recordmydesktop/src/make_dummy_pointer.c index 0ab0306..7f6425f 100644 --- a/recordmydesktop/src/make_dummy_pointer.c +++ b/recordmydesktop/src/make_dummy_pointer.c @@ -29,8 +29,8 @@ unsigned char *MakeDummyPointer(DisplaySpecs *specs,int size,int color,int type,unsigned char *npxl){ int i,k,o='.'; - unsigned long w=(color)?1:-1, - b=(color)?-1:1; + unsigned long b=(color)?'w':'b', + w=(color)?'b':'w'; char pmask[1][16][16]={{ {w,w,w,w,w,w,o,o,o,o,o,o,o,o,o,o}, {w,b,b,w,w,w,w,o,o,o,o,o,o,o,o,o}, @@ -49,18 +49,26 @@ unsigned char *MakeDummyPointer(DisplaySpecs *specs,int size,int color,int type, {o,o,o,o,o,w,w,b,b,b,w,w,w,o,o,o}, {o,o,o,o,o,o,w,w,w,w,w,w,w,o,o,o}} }; - - unsigned char *ret=malloc(size*sizeof(char[size*4])); - unsigned char wp[4]={255,255,255,255}; - unsigned char bp[4]={0,0,0,0}; + unsigned char wp[4]={ + ((specs->wpixel^0xff000000)>>24), + ((specs->wpixel^0x00ff0000)>>16), + ((specs->wpixel^0x0000ff00)>>8), + ((specs->wpixel^0x000000ff)) + }; + unsigned char bp[4]={ + ((specs->bpixel^0xff000000)>>24), + ((specs->bpixel^0x00ff0000)>>16), + ((specs->bpixel^0x0000ff00)>>8), + ((specs->bpixel^0x000000ff)) + }; *npxl=((wp[0]-1)!=bp[0])?wp[0]-100:wp[0]-102; for(i=0;i