Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

move code around to make checkwps compile

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29536 a1c6a512-1295-4272-9138-f99709370657

+65 -63
-62
apps/gui/skin_engine/skin_engine.c
··· 259 259 FOR_NB_SCREENS(i) 260 260 skins[skin][i].needs_full_update = true; 261 261 } 262 - 263 - 264 - void *skin_find_item(const char *label, enum skin_find_what what, 265 - struct wps_data *data) 266 - { 267 - const char *itemlabel = NULL; 268 - union { 269 - struct skin_token_list *linkedlist; 270 - struct skin_element *vplist; 271 - } list; 272 - bool isvplist = false; 273 - void *ret = NULL; 274 - switch (what) 275 - { 276 - case SKIN_FIND_UIVP: 277 - case SKIN_FIND_VP: 278 - list.vplist = data->tree; 279 - isvplist = true; 280 - break; 281 - case SKIN_FIND_IMAGE: 282 - list.linkedlist = data->images; 283 - break; 284 - #ifdef HAVE_TOUCHSCREEN 285 - case SKIN_FIND_TOUCHREGION: 286 - list.linkedlist = data->touchregions; 287 - break; 288 - #endif 289 - } 290 - 291 - while (list.linkedlist) 292 - { 293 - bool skip = false; 294 - switch (what) 295 - { 296 - case SKIN_FIND_UIVP: 297 - case SKIN_FIND_VP: 298 - ret = list.vplist->data; 299 - itemlabel = ((struct skin_viewport *)ret)->label; 300 - skip = !(((struct skin_viewport *)ret)->is_infovp == 301 - (what==SKIN_FIND_UIVP)); 302 - break; 303 - case SKIN_FIND_IMAGE: 304 - ret = list.linkedlist->token->value.data; 305 - itemlabel = ((struct gui_img *)ret)->label; 306 - break; 307 - #ifdef HAVE_TOUCHSCREEN 308 - case SKIN_FIND_TOUCHREGION: 309 - ret = list.linkedlist->token->value.data; 310 - itemlabel = ((struct touchregion *)ret)->label; 311 - break; 312 - #endif 313 - } 314 - if (!skip && itemlabel && !strcmp(itemlabel, label)) 315 - return ret; 316 - 317 - if (isvplist) 318 - list.vplist = list.vplist->next; 319 - else 320 - list.linkedlist = list.linkedlist->next; 321 - } 322 - return NULL; 323 - }
+62
apps/gui/skin_engine/skin_parser.c
··· 117 117 118 118 #endif 119 119 120 + 121 + void *skin_find_item(const char *label, enum skin_find_what what, 122 + struct wps_data *data) 123 + { 124 + const char *itemlabel = NULL; 125 + union { 126 + struct skin_token_list *linkedlist; 127 + struct skin_element *vplist; 128 + } list; 129 + bool isvplist = false; 130 + void *ret = NULL; 131 + switch (what) 132 + { 133 + case SKIN_FIND_UIVP: 134 + case SKIN_FIND_VP: 135 + list.vplist = data->tree; 136 + isvplist = true; 137 + break; 138 + case SKIN_FIND_IMAGE: 139 + list.linkedlist = data->images; 140 + break; 141 + #ifdef HAVE_TOUCHSCREEN 142 + case SKIN_FIND_TOUCHREGION: 143 + list.linkedlist = data->touchregions; 144 + break; 145 + #endif 146 + } 147 + 148 + while (list.linkedlist) 149 + { 150 + bool skip = false; 151 + switch (what) 152 + { 153 + case SKIN_FIND_UIVP: 154 + case SKIN_FIND_VP: 155 + ret = list.vplist->data; 156 + itemlabel = ((struct skin_viewport *)ret)->label; 157 + skip = !(((struct skin_viewport *)ret)->is_infovp == 158 + (what==SKIN_FIND_UIVP)); 159 + break; 160 + case SKIN_FIND_IMAGE: 161 + ret = list.linkedlist->token->value.data; 162 + itemlabel = ((struct gui_img *)ret)->label; 163 + break; 164 + #ifdef HAVE_TOUCHSCREEN 165 + case SKIN_FIND_TOUCHREGION: 166 + ret = list.linkedlist->token->value.data; 167 + itemlabel = ((struct touchregion *)ret)->label; 168 + break; 169 + #endif 170 + } 171 + if (!skip && itemlabel && !strcmp(itemlabel, label)) 172 + return ret; 173 + 174 + if (isvplist) 175 + list.vplist = list.vplist->next; 176 + else 177 + list.linkedlist = list.linkedlist->next; 178 + } 179 + return NULL; 180 + } 181 + 120 182 #ifdef HAVE_LCD_BITMAP 121 183 122 184 /* create and init a new wpsll item.
+3 -1
apps/gui/skin_engine/wps_internals.h
··· 368 368 SKIN_FIND_VP = 0, 369 369 SKIN_FIND_UIVP, 370 370 SKIN_FIND_IMAGE, 371 - SKIN_FIND_TOUCHREGION 371 + #ifdef HAVE_TOUCHSCREEN 372 + SKIN_FIND_TOUCHREGION, 373 + #endif 372 374 }; 373 375 void *skin_find_item(const char *label, enum skin_find_what what, 374 376 struct wps_data *data);