freebsd-dev/lib/libvgl
Bruce Evans aa1ce985e4 Fix copying of bitmaps in depths > 8. This fix is complete, except different
depths for the source and target are not supported.  The bits for higher
numbered planes (mostly for red) were either not copied or were copied to
lower numbered planes for nearby pixels.

Quick fix for creation of mouse cursor bitmaps in all depths.   This fix is
only complete for the default lightwhite cursor with a black frame.

Even the lightwhite and black colors are hard to find.  The templates
use 0xff for lightwhite, but that means brightblue in the simplest mode
(Truecolor depth 24).  Other modes are even more complicated -- they are
singly or doubly indirect throught palette(s) and changing of the palettes
by applications is supported.

Details:

Replicate the template value for Truecolor modes to fill out the target
depth (and more for depths not a multiple of 8).  Do this for every
drawing of the cursor so that it sort of works for mouse cursor bitmaps
set by applications.

Use 0xf for lightwhite in most other modes.  Only do this for the
default cursor so that it doesn't affect mouse cursor bitmaps set by
applications.  0xf mostly works because it was originally for CGA
lightwhite and is emulated using 1 or 2 indirections on EGA and VGA.
0x3f (EGA white) and 0xff (VGA black) direct palette indexes mostly
don't work since backwards compatibility inhibits or prevents them
representing lightwhite.  But 0x3f (EGA white) must be used for mode
37 (VGA_MODEX) (320x240x8 V) since this mode is closer to EGA than VGA.
2019-03-27 08:02:55 +00:00
..
bitmap.c Fix copying of bitmaps in depths > 8. This fix is complete, except different 2019-03-27 08:02:55 +00:00
keyboard.c lib: further adoption of SPDX licensing ID tags. 2017-11-26 02:00:33 +00:00
main.c Fix buffer overruns in modes with color depth more than 8. 2019-03-24 18:57:03 +00:00
Makefile First pass through library packaging. 2016-02-04 21:16:35 +00:00
Makefile.depend DIRDEPS_BUILD: Update dependencies. 2017-10-31 00:07:04 +00:00
mouse.c Fix copying of bitmaps in depths > 8. This fix is complete, except different 2019-03-27 08:02:55 +00:00
simple.c Fix another type of buffer overrun for segmented modes. The buffer index 2019-03-25 11:48:40 +00:00
text.c Fix the type of the color args for VGLMouseFreeze(), VGLBitmapPutChar(), 2019-03-24 20:36:35 +00:00
vgl.3 Oops, my previous commit to libvgl was missing the change of VGLSetBorder() 2019-03-24 20:43:21 +00:00
vgl.h Oops, my previous commit to libvgl was missing the change of VGLSetBorder() 2019-03-24 20:43:21 +00:00