aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorreinelt <>2004-02-29 14:30:59 +0000
committerreinelt <>2004-02-29 14:30:59 +0000
commit3fc84f2f1b15597929a5aa5212b714014a5d2204 (patch)
treed0db95d1b8d379b8fe8fb2fc415c9952e3398ea6
parent8659e71bd29eac3eb42ff1c711b2d9f11d777099 (diff)
downloadlcd4linux-3fc84f2f1b15597929a5aa5212b714014a5d2204.tar.gz
[lcd4linux @ 2004-02-29 14:30:59 by reinelt]
icon visibility fix for generic graphics from Xavier
Diffstat (limited to '')
-rw-r--r--drv_generic_graphic.c12
1 files 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<YRES; y++) {
int mask=1<<XRES;
for (x=0; x<XRES; x++) {
- mask>>=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;
+ }
}
}