diff options
Diffstat (limited to 'apps/recorder/albumart.c')
-rw-r--r-- | apps/recorder/albumart.c | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/apps/recorder/albumart.c b/apps/recorder/albumart.c index abae8c1afc..2722b57f8a 100644 --- a/apps/recorder/albumart.c +++ b/apps/recorder/albumart.c | |||
@@ -231,8 +231,9 @@ bool find_albumart(const struct mp3entry *id3, char *buf, int buflen) | |||
231 | return search_files(id3, size_string, buf, buflen); | 231 | return search_files(id3, size_string, buf, buflen); |
232 | } | 232 | } |
233 | 233 | ||
234 | /* Draw the album art bitmap from the given handle ID onto the given WPS. */ | 234 | /* Draw the album art bitmap from the given handle ID onto the given WPS. |
235 | void draw_album_art(struct gui_wps *gwps, int handle_id) | 235 | Call with clear = true to clear the bitmap instead of drawing it. */ |
236 | void draw_album_art(struct gui_wps *gwps, int handle_id, bool clear) | ||
236 | { | 237 | { |
237 | if (!gwps || !gwps->data || !gwps->display || handle_id < 0) | 238 | if (!gwps || !gwps->data || !gwps->display || handle_id < 0) |
238 | return; | 239 | return; |
@@ -277,9 +278,19 @@ void draw_album_art(struct gui_wps *gwps, int handle_id) | |||
277 | y += (data->albumart_max_height - height) / 2; | 278 | y += (data->albumart_max_height - height) / 2; |
278 | } | 279 | } |
279 | 280 | ||
280 | /* Draw the bitmap */ | 281 | if (!clear) |
281 | gwps->display->set_drawmode(DRMODE_FG); | 282 | { |
282 | gwps->display->bitmap_part((fb_data*)bmp->data, 0, 0, bmp->width, | 283 | /* Draw the bitmap */ |
283 | x, y, width, height); | 284 | gwps->display->set_drawmode(DRMODE_FG); |
284 | gwps->display->set_drawmode(DRMODE_SOLID); | 285 | gwps->display->bitmap_part((fb_data*)bmp->data, 0, 0, bmp->width, |
286 | x, y, width, height); | ||
287 | gwps->display->set_drawmode(DRMODE_SOLID); | ||
288 | } | ||
289 | else | ||
290 | { | ||
291 | /* Clear the bitmap */ | ||
292 | gwps->display->set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID); | ||
293 | gwps->display->fillrect(x, y, width, height); | ||
294 | gwps->display->set_drawmode(DRMODE_SOLID); | ||
295 | } | ||
285 | } | 296 | } |