diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/gui/gwps-common.c | 9 | ||||
-rw-r--r-- | apps/screen_access.c | 6 | ||||
-rw-r--r-- | apps/screen_access.h | 2 |
3 files changed, 13 insertions, 4 deletions
diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c index d15dbba888..b32deba479 100644 --- a/apps/gui/gwps-common.c +++ b/apps/gui/gwps-common.c | |||
@@ -219,7 +219,7 @@ bool wps_data_preload_tags(struct wps_data *data, char *buf, | |||
219 | data->img[n].bm.data = data->img_buf_ptr; | 219 | data->img[n].bm.data = data->img_buf_ptr; |
220 | ret = read_bmp_file(imgname, &data->img[n].bm, | 220 | ret = read_bmp_file(imgname, &data->img[n].bm, |
221 | data->img_buf_free, | 221 | data->img_buf_free, |
222 | FORMAT_ANY); | 222 | FORMAT_ANY|FORMAT_TRANSPARENT); |
223 | if (ret > 0) | 223 | if (ret > 0) |
224 | { | 224 | { |
225 | data->img_buf_ptr += ret; | 225 | data->img_buf_ptr += ret; |
@@ -1252,9 +1252,10 @@ static void wps_draw_image(struct gui_wps *gwps, int n) | |||
1252 | data->img[n].bm.height); | 1252 | data->img[n].bm.height); |
1253 | #if LCD_DEPTH > 1 | 1253 | #if LCD_DEPTH > 1 |
1254 | } else { | 1254 | } else { |
1255 | display->bitmap((fb_data *)data->img[n].bm.data, data->img[n].x, | 1255 | display->transparent_bitmap((fb_data *)data->img[n].bm.data, |
1256 | data->img[n].y, data->img[n].bm.width, | 1256 | data->img[n].x, |
1257 | data->img[n].bm.height); | 1257 | data->img[n].y, data->img[n].bm.width, |
1258 | data->img[n].bm.height); | ||
1258 | } | 1259 | } |
1259 | #endif | 1260 | #endif |
1260 | } | 1261 | } |
diff --git a/apps/screen_access.c b/apps/screen_access.c index 8f7f5c5aae..d38f1ca6a9 100644 --- a/apps/screen_access.c +++ b/apps/screen_access.c | |||
@@ -121,6 +121,12 @@ void screen_init(struct screen * screen, enum screen_type screen_type) | |||
121 | screen->set_drawmode=&lcd_set_drawmode; | 121 | screen->set_drawmode=&lcd_set_drawmode; |
122 | #if LCD_DEPTH > 1 | 122 | #if LCD_DEPTH > 1 |
123 | screen->bitmap=&lcd_bitmap; | 123 | screen->bitmap=&lcd_bitmap; |
124 | #if LCD_DEPTH == 2 | ||
125 | /* No transparency yet for grayscale lcd */ | ||
126 | screen->transparent_bitmap=&lcd_bitmap; | ||
127 | #else | ||
128 | screen->transparent_bitmap=&lcd_bitmap_transparent; | ||
129 | #endif | ||
124 | screen->set_background=&lcd_set_background; | 130 | screen->set_background=&lcd_set_background; |
125 | #endif | 131 | #endif |
126 | screen->update_rect=&lcd_update_rect; | 132 | screen->update_rect=&lcd_update_rect; |
diff --git a/apps/screen_access.h b/apps/screen_access.h index af52527fc0..3664ecb13d 100644 --- a/apps/screen_access.h +++ b/apps/screen_access.h | |||
@@ -84,6 +84,8 @@ struct screen | |||
84 | int x, int y, int width, int height); | 84 | int x, int y, int width, int height); |
85 | void (*bitmap)(const fb_data *src, | 85 | void (*bitmap)(const fb_data *src, |
86 | int x, int y, int width, int height); | 86 | int x, int y, int width, int height); |
87 | void (*transparent_bitmap)(const fb_data *src, | ||
88 | int x, int y, int width, int height); | ||
87 | void (*set_drawmode)(int mode); | 89 | void (*set_drawmode)(int mode); |
88 | #if (LCD_DEPTH > 1) || (LCD_REMOTE_DEPTH > 1) | 90 | #if (LCD_DEPTH > 1) || (LCD_REMOTE_DEPTH > 1) |
89 | void (*set_background)(unsigned background); | 91 | void (*set_background)(unsigned background); |