summaryrefslogtreecommitdiff
path: root/apps/gui/skin_engine/skin_parser.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2010-04-19 08:43:42 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2010-04-19 08:43:42 +0000
commit58a0393154cfced92830fed1a78450761f30f3b9 (patch)
tree9f00c8b5779a0d045b5fdd860f0e995b2c593a90 /apps/gui/skin_engine/skin_parser.c
parent1cd1e66ed361d908b517d224aab6da0cc8693f1e (diff)
downloadrockbox-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_parser.c')
-rw-r--r--apps/gui/skin_engine/skin_parser.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c
index cac3b381b7..93c5c73210 100644
--- a/apps/gui/skin_engine/skin_parser.c
+++ b/apps/gui/skin_engine/skin_parser.c
@@ -1158,6 +1158,7 @@ static int parse_progressbar(const char *wps_bufptr,
1158 pb->have_bitmap_pb = false; 1158 pb->have_bitmap_pb = false;
1159 pb->bm.data = NULL; /* no bitmap specified */ 1159 pb->bm.data = NULL; /* no bitmap specified */
1160 pb->follow_lang_direction = follow_lang_direction > 0; 1160 pb->follow_lang_direction = follow_lang_direction > 0;
1161 pb->draw = false;
1161 1162
1162 if (*wps_bufptr != '|') /* regular old style */ 1163 if (*wps_bufptr != '|') /* regular old style */
1163 { 1164 {
@@ -1174,7 +1175,14 @@ static int parse_progressbar(const char *wps_bufptr,
1174 1175
1175 if (!(ptr = parse_list("sdddd", &set, '|', ptr, &filename, 1176 if (!(ptr = parse_list("sdddd", &set, '|', ptr, &filename,
1176 &x, &y, &width, &height))) 1177 &x, &y, &width, &height)))
1178 {
1179 /* if we are in a conditional then we probably don't want to fail
1180 * if the above doesnt work. so ASSume the | is breaking the conditional
1181 * and move on. the next token will fail if this is incorrect */
1182 if (level > 0)
1183 return 0;
1177 return WPS_ERROR_INVALID_PARAM; 1184 return WPS_ERROR_INVALID_PARAM;
1185 }
1178 1186
1179 if (LIST_VALUE_PARSED(set, PB_FILENAME)) /* filename */ 1187 if (LIST_VALUE_PARSED(set, PB_FILENAME)) /* filename */
1180 pb->bm.data = (char*)filename; 1188 pb->bm.data = (char*)filename;