dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Rockbox mail archive

Subject: Regarding the new %xd feature in r27717

Regarding the new %xd feature in r27717

From: Magnus Holmgren <>
Date: Wed, 11 Aug 2010 21:23:22 +0200


Regarding the new %xd feature in r27717 (specifying an "enum" tag as
second argument). I tried using it, and noticed a few things:

* Shouldn't clear_image_pos() always be called, so that behavior
   is the same as within a conditional? If not, you can't really
   use it with images with transparency...

* Rather than passing TOKEN_VALUE_ONLY to get_token_value for
   the sub-token, wouldn't it be better to pass
   img->num_subimages, so that it can be used for things like
   battery level as well?

   However, for battery level to work properly, another change is
   needed; the intval need to be calculated like this:

       *(limit - 2) * l / 100 + 2;

   Otherwise nothing is displayed for the full level (100%) (and
   when using a conditional, the last image is displayed for the
   two highest intvals). I'm pretty sure it used to work like
   this once...

Any opinions?

Unrelated: when trying this out I tried using --debug-wps on the
simulator to see why a WPS failed to load. All that produced where
printouts about the loaded filenames. It is supposed to do more, isn't it?

Received on 2010-08-11

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy