diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2010-11-18 11:47:42 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2010-11-18 11:47:42 +0000 |
commit | 1ce7ba4931c64a7ae6a95981e838db97d7e05699 (patch) | |
tree | 0bb3de85e23bb64951f3acbd176a20301f7efb30 /apps/gui/skin_engine/skin_display.c | |
parent | 62b8efe6741b61ef10d3c7b98dd0d3416b7fce11 (diff) | |
download | rockbox-1ce7ba4931c64a7ae6a95981e838db97d7e05699.tar.gz rockbox-1ce7ba4931c64a7ae6a95981e838db97d7e05699.zip |
Make the %tr (radio RSSI) tag work as a bar tag or as a conditional.
As a conditional it scales its value to the number of options you give it (like volume)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28613 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/skin_engine/skin_display.c')
-rw-r--r-- | apps/gui/skin_engine/skin_display.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/apps/gui/skin_engine/skin_display.c b/apps/gui/skin_engine/skin_display.c index 78db4eb371..47de4638d8 100644 --- a/apps/gui/skin_engine/skin_display.c +++ b/apps/gui/skin_engine/skin_display.c @@ -162,9 +162,22 @@ void draw_progressbar(struct gui_wps *gwps, int line, struct progressbar *pb) #if CONFIG_TUNER else if (in_radio_screen() || (get_radio_status() != FMRADIO_OFF)) { - int min = fm_region_data[global_settings.fm_region].freq_min; - end = radio_current_frequency() - min; - length = fm_region_data[global_settings.fm_region].freq_max - min; +#ifdef HAVE_RADIO_RSSI + if (pb->type == SKIN_TOKEN_TUNER_RSSI_BAR) + { + int val = tuner_get(RADIO_RSSI); + int min = tuner_get(RADIO_RSSI_MIN); + int max = tuner_get(RADIO_RSSI_MAX); + end = val - min; + length = max - min; + } + else +#endif + { + int min = fm_region_data[global_settings.fm_region].freq_min; + end = radio_current_frequency() - min; + length = fm_region_data[global_settings.fm_region].freq_max - min; + } } #endif else if (id3 && id3->length) |