From e6ee931ee5772eef9f18fe07bf6963c482a451f4 Mon Sep 17 00:00:00 2001 From: reinelt Date: Sun, 29 Feb 2004 14:30:59 +0000 Subject: [lcd4linux @ 2004-02-29 14:30:59 by reinelt] icon visibility fix for generic graphics from Xavier git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@380 3ae390bd-cb1e-0410-b409-cd5a39f66f1f --- drv_generic_graphic.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drv_generic_graphic.c b/drv_generic_graphic.c index 6d9c7b7..d7968f7 100644 --- a/drv_generic_graphic.c +++ b/drv_generic_graphic.c @@ -23,6 +23,9 @@ * * * $Log: drv_generic_graphic.c,v $ + * Revision 1.5 2004/02/29 14:30:59 reinelt + * icon visibility fix for generic graphics from Xavier + * * Revision 1.4 2004/02/24 05:55:04 reinelt * * X11 driver ported @@ -180,8 +183,13 @@ int drv_generic_graphic_icon_draw (WIDGET *W) for (y=0; y>=1; - drv_generic_graphic_FB[(row+y)*LCOLS+col+x] = Icon->visible ? 0 : bitmap[y]&mask ? 1 : 0; + int i = (row+y)*LCOLS+col+x; + mask >>= 1; + if (Icon->visible) { + drv_generic_graphic_FB[i] = bitmap[y]&mask ? 1 : 0; + } else { + drv_generic_graphic_FB[i] = 0; + } } } -- cgit v1.2.3