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.

When using the tag argument in %%xd(): 1) clear the image first, so that images with transparency can be used; 2) allow things like battery level or volume, where a value is limited to the number of sub-images.

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

+9 -6
+9 -6
apps/gui/skin_engine/skin_render.c
··· 157 157 { 158 158 char buf[16]; 159 159 const char *out; 160 - int a = TOKEN_VALUE_ONLY; 160 + int a = img->num_subimages; 161 161 out = get_token_value(gwps, id->token, buf, sizeof(buf), &a); 162 + 162 163 /* NOTE: get_token_value() returns values starting at 1! */ 163 164 if (a == -1) 164 165 a = (out && *out) ? 1 : 2; 165 166 a--; 166 167 a += id->offset; 168 + 169 + /* Clear the image, as in conditionals */ 170 + clear_image_pos(gwps, img); 171 + 167 172 /* If the token returned a value which is higher than 168 - * the amount of subimages clear the image. */ 169 - if (a<0 || a >= img->num_subimages) 173 + * the amount of subimages, don't draw it. */ 174 + if (a >= 0 && a < img->num_subimages) 170 175 { 171 - clear_image_pos(gwps, img); 176 + img->display = a; 172 177 } 173 - else 174 - img->display = a; 175 178 } 176 179 } 177 180 break;