From 58a0393154cfced92830fed1a78450761f30f3b9 Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Mon, 19 Apr 2010 08:43:42 +0000 Subject: 2 quick fixes 1) fix %pv| where the | is for a conditional break and not for long form %pv 2) only draw bmp-bars if they are enabled (by a conditional or always on.) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25677 a1c6a512-1295-4272-9138-f99709370657 --- apps/gui/skin_engine/skin_display.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'apps/gui/skin_engine/skin_display.c') diff --git a/apps/gui/skin_engine/skin_display.c b/apps/gui/skin_engine/skin_display.c index 827d90c630..9cef12a690 100644 --- a/apps/gui/skin_engine/skin_display.c +++ b/apps/gui/skin_engine/skin_display.c @@ -608,6 +608,12 @@ 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, data)); + else if (data->tokens[i].type == WPS_TOKEN_VOLUMEBAR || + data->tokens[i].type == WPS_TOKEN_PROGRESSBAR) + { + struct progressbar *bar = (struct progressbar*)data->tokens[i].value.data; + bar->draw = false; + } #endif #ifdef HAVE_ALBUMART if (data->albumart && data->tokens[i].type == WPS_TOKEN_ALBUMART_DISPLAY) @@ -670,6 +676,13 @@ static bool get_line(struct gui_wps *gwps, break; #ifdef HAVE_LCD_BITMAP + case WPS_TOKEN_VOLUMEBAR: + case WPS_TOKEN_PROGRESSBAR: + { + struct progressbar *bar = (struct progressbar*)data->tokens[i].value.data; + bar->draw = true; + } + break; case WPS_TOKEN_IMAGE_PRELOAD_DISPLAY: { char n = data->tokens[i].value.i & 0xFF; @@ -1255,7 +1268,7 @@ static bool skin_redraw(struct gui_wps *gwps, unsigned refresh_mode) while (bar) { struct progressbar *thisbar = (struct progressbar*)bar->token->value.data; - if (thisbar->vp == &skin_viewport->vp) + if (thisbar->vp == &skin_viewport->vp && thisbar->draw) { draw_progressbar(gwps, thisbar); } -- cgit v1.2.3