From 7b6265edf5d2f71cb25d9ee71f30dbe14a2427a6 Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Thu, 17 Sep 2009 21:01:32 +0000 Subject: Fix a bug where the conditional use of %C (i.e. %?C) caused the album art to draw (noticed in FS#10596). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22721 a1c6a512-1295-4272-9138-f99709370657 --- apps/gui/skin_engine/skin_display.c | 15 ++++++++------- apps/gui/skin_engine/skin_tokens.c | 1 - 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/gui/skin_engine/skin_display.c b/apps/gui/skin_engine/skin_display.c index e24ab66393..762b7f78a6 100644 --- a/apps/gui/skin_engine/skin_display.c +++ b/apps/gui/skin_engine/skin_display.c @@ -474,13 +474,6 @@ static bool evaluate_conditional(struct gui_wps *gwps, int *token_index) /* clear all pictures in the conditional and nested ones */ if (data->tokens[i].type == WPS_TOKEN_IMAGE_PRELOAD_DISPLAY) clear_image_pos(gwps, find_image(data->tokens[i].value.i&0xFF, gwps->data)); -#endif -#ifdef HAVE_ALBUMART - if (data->albumart && data->tokens[i].type == WPS_TOKEN_ALBUMART_DISPLAY) - { - draw_album_art(gwps, audio_current_aa_hid(), true); - data->albumart->draw = false; - } #endif } @@ -629,6 +622,14 @@ static bool get_line(struct gui_wps *gwps, } } break; +#ifdef HAVE_ALBUMART + case WPS_TOKEN_ALBUMART_DISPLAY: + if (data->albumart) + { + data->albumart->draw = true; + } + break; +#endif default: { /* get the value of the tag and copy it to the buffer */ diff --git a/apps/gui/skin_engine/skin_tokens.c b/apps/gui/skin_engine/skin_tokens.c index 7f83da0451..6d4fef5ab5 100644 --- a/apps/gui/skin_engine/skin_tokens.c +++ b/apps/gui/skin_engine/skin_tokens.c @@ -322,7 +322,6 @@ const char *get_token_value(struct gui_wps *gwps, if (!data->albumart) return NULL; if (audio_current_aa_hid() >= 0) { - data->albumart->draw = true; return "C"; } data->albumart->draw = false; -- cgit v1.2.3