summaryrefslogtreecommitdiff
path: root/apps/gui
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2022-03-14 17:16:48 -0400
committerWilliam Wilgus <wilgus.william@gmail.com>2022-03-14 17:23:18 -0400
commit9b4e7845602683882577aa9fe52aa55f3874a341 (patch)
tree8bd997bd63346f514e3ab3acb8220352701d8753 /apps/gui
parent6dcbf7ff77b0596c3317a76097e8b0c1c2f8158a (diff)
downloadrockbox-9b4e7845602683882577aa9fe52aa55f3874a341.tar.gz
rockbox-9b4e7845602683882577aa9fe52aa55f3874a341.zip
BUGFIX string_option parsers
fix bugs introduced in the switch over to using string_option instead of if else strcmp trees, embedded album art should work again skin parser had an error for 'noborder' and 'nobar' Change-Id: I957d81e5fa8467b33bbd93d63c4428c36100acca
Diffstat (limited to 'apps/gui')
-rw-r--r--apps/gui/skin_engine/skin_parser.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c
index a9b1ef4706..ee32c06ace 100644
--- a/apps/gui/skin_engine/skin_parser.c
+++ b/apps/gui/skin_engine/skin_parser.c
@@ -1051,12 +1051,15 @@ static int parse_progressbar_tag(struct skin_element* element,
1051 enum 1051 enum
1052 { 1052 {
1053 eINVERT = 0, eNOFILL, eNOBORDER, eNOBAR, eSLIDER, eIMAGE, 1053 eINVERT = 0, eNOFILL, eNOBORDER, eNOBAR, eSLIDER, eIMAGE,
1054 eBACKDROP, eVERTICAL, eHORIZONTAL, eNOTOUCH, eSETTING 1054 eBACKDROP, eVERTICAL, eHORIZONTAL, eNOTOUCH, eSETTING,
1055 e_PB_TAG_COUNT
1055 }; 1056 };
1056 1057
1057 static const char *pb_options[] = {"invert", "nofill", "noborder, nobar", "slider", 1058 static const char *pb_options[e_PB_TAG_COUNT + 1] = {[eINVERT] = "invert",
1058 "image", "backdrop", "vertical", "horizontal", 1059 [eNOFILL] = "nofill", [eNOBORDER] = "noborder", [eNOBAR] = "nobar",
1059 "notouch", "setting", NULL}; 1060 [eSLIDER] = "slider", [eIMAGE] = "image", [eBACKDROP] = "backdrop",
1061 [eVERTICAL] = "vertical", [eHORIZONTAL] = "horizontal",
1062 [eNOTOUCH] = "notouch", [eSETTING] = "setting", [e_PB_TAG_COUNT] = NULL};
1060 int pb_op; 1063 int pb_op;
1061 1064
1062 while (curr_param < element->params_count) 1065 while (curr_param < element->params_count)
@@ -1409,7 +1412,7 @@ static int parse_skinvar( struct skin_element *element,
1409 1412
1410 if (!isdefault(get_param(element, 2))) 1413 if (!isdefault(get_param(element, 2)))
1411 data->newval = get_param(element, 2)->data.number; 1414 data->newval = get_param(element, 2)->data.number;
1412 else if (sv_op == 0) /*touch*/ 1415 else if (sv_op != 0) /*!touch*/
1413 return WPS_ERROR_INVALID_PARAM; 1416 return WPS_ERROR_INVALID_PARAM;
1414 data->max = 0; 1417 data->max = 0;
1415 if (sv_op == 1) /*set*/ 1418 if (sv_op == 1) /*set*/