[<<] [<] Page 1 of 1 [>] [>>] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
GrSetSystemPalette()
From: George Harvey ####@####.#### Date: 3 Jun 2000 22:18:03 -0000 Message-Id: <yam8189.122.142990816@smtp.dial.pipex.com> Hi, I am updating my VNC port to use GrSetSystemPalette() and have run into an inconsistency in the palette setting code in the screen drivers, specifically the index used to access the palette array. As far as I can tell, the frame buffer driver uses the correct index while the X11 driver uses an incorrect index. The change needed to the X11 driver is only three lines as follows: *** scr_x11.cSat Apr 15 03:34:21 2000 --- /usr/local/src/microwin/src/drivers/scr_x11.cSat Jun 3 22:36:19 2000 *************** *** 511,519 **** XColor exact; XColor def; ! r = pal[first+i].r; ! g = pal[first+i].g; ! b = pal[first+i].b; sprintf(spec, "#%02x%02x%02x", r, g, b); XLookupColor(x11_dpy, x11_colormap, spec, &exact, &def); XAllocColor(x11_dpy, x11_colormap, &def); --- 511,519 ---- XColor exact; XColor def; ! r = pal[i].r; ! g = pal[i].g; ! b = pal[i].b; sprintf(spec, "#%02x%02x%02x", r, g, b); XLookupColor(x11_dpy, x11_colormap, spec, &exact, &def); XAllocColor(x11_dpy, x11_colormap, &def); I only have my Prisma driver and the X11 driver to test with so I just want to confirm that the above change is correct. Greg, am I on the right track here? Thanks, George | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[<<] [<] Page 1 of 1 [>] [>>] |