aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2004-02-29 14:30:59 +0000
committerreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2004-02-29 14:30:59 +0000
commite6ee931ee5772eef9f18fe07bf6963c482a451f4 (patch)
treed0db95d1b8d379b8fe8fb2fc415c9952e3398ea6
parent485a26f6e3e2e84d7f9b8279fa6d7f440ea50a8b (diff)
downloadlcd4linux-e6ee931ee5772eef9f18fe07bf6963c482a451f4.tar.gz
[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
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;
+ }
}
}