diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2010-04-19 08:43:42 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2010-04-19 08:43:42 +0000 |
commit | 58a0393154cfced92830fed1a78450761f30f3b9 (patch) | |
tree | 9f00c8b5779a0d045b5fdd860f0e995b2c593a90 /apps/gui/skin_engine/skin_display.c | |
parent | 1cd1e66ed361d908b517d224aab6da0cc8693f1e (diff) | |
download | rockbox-58a0393154cfced92830fed1a78450761f30f3b9.tar.gz rockbox-58a0393154cfced92830fed1a78450761f30f3b9.zip |
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
Diffstat (limited to 'apps/gui/skin_engine/skin_display.c')
-rw-r--r-- | apps/gui/skin_engine/skin_display.c | 15 |
1 files changed, 14 insertions, 1 deletions
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) | |||
608 | /* clear all pictures in the conditional and nested ones */ | 608 | /* clear all pictures in the conditional and nested ones */ |
609 | if (data->tokens[i].type == WPS_TOKEN_IMAGE_PRELOAD_DISPLAY) | 609 | if (data->tokens[i].type == WPS_TOKEN_IMAGE_PRELOAD_DISPLAY) |
610 | clear_image_pos(gwps, find_image(data->tokens[i].value.i&0xFF, data)); | 610 | clear_image_pos(gwps, find_image(data->tokens[i].value.i&0xFF, data)); |
611 | else if (data->tokens[i].type == WPS_TOKEN_VOLUMEBAR || | ||
612 | data->tokens[i].type == WPS_TOKEN_PROGRESSBAR) | ||
613 | { | ||
614 | struct progressbar *bar = (struct progressbar*)data->tokens[i].value.data; | ||
615 | bar->draw = false; | ||
616 | } | ||
611 | #endif | 617 | #endif |
612 | #ifdef HAVE_ALBUMART | 618 | #ifdef HAVE_ALBUMART |
613 | if (data->albumart && data->tokens[i].type == WPS_TOKEN_ALBUMART_DISPLAY) | 619 | if (data->albumart && data->tokens[i].type == WPS_TOKEN_ALBUMART_DISPLAY) |
@@ -670,6 +676,13 @@ static bool get_line(struct gui_wps *gwps, | |||
670 | break; | 676 | break; |
671 | 677 | ||
672 | #ifdef HAVE_LCD_BITMAP | 678 | #ifdef HAVE_LCD_BITMAP |
679 | case WPS_TOKEN_VOLUMEBAR: | ||
680 | case WPS_TOKEN_PROGRESSBAR: | ||
681 | { | ||
682 | struct progressbar *bar = (struct progressbar*)data->tokens[i].value.data; | ||
683 | bar->draw = true; | ||
684 | } | ||
685 | break; | ||
673 | case WPS_TOKEN_IMAGE_PRELOAD_DISPLAY: | 686 | case WPS_TOKEN_IMAGE_PRELOAD_DISPLAY: |
674 | { | 687 | { |
675 | char n = data->tokens[i].value.i & 0xFF; | 688 | char n = data->tokens[i].value.i & 0xFF; |
@@ -1255,7 +1268,7 @@ static bool skin_redraw(struct gui_wps *gwps, unsigned refresh_mode) | |||
1255 | while (bar) | 1268 | while (bar) |
1256 | { | 1269 | { |
1257 | struct progressbar *thisbar = (struct progressbar*)bar->token->value.data; | 1270 | struct progressbar *thisbar = (struct progressbar*)bar->token->value.data; |
1258 | if (thisbar->vp == &skin_viewport->vp) | 1271 | if (thisbar->vp == &skin_viewport->vp && thisbar->draw) |
1259 | { | 1272 | { |
1260 | draw_progressbar(gwps, thisbar); | 1273 | draw_progressbar(gwps, thisbar); |
1261 | } | 1274 | } |