diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2009-11-22 19:09:54 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2009-11-22 19:09:54 +0000 |
commit | 49666660628d6c5eab843b296dd3b5f89806c5a6 (patch) | |
tree | 2b4db9f1b07e7a41542ea38c3f8f68c0dca465ba /apps/gui/skin_engine/skin_tokens.c | |
parent | 360d00f6000eb9fe3ee15e86b7bcd991c9758802 (diff) | |
download | rockbox-49666660628d6c5eab843b296dd3b5f89806c5a6.tar.gz rockbox-49666660628d6c5eab843b296dd3b5f89806c5a6.zip |
fix mono recording token,
Add %bu - usb powered token
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23713 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/skin_engine/skin_tokens.c')
-rw-r--r-- | apps/gui/skin_engine/skin_tokens.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/apps/gui/skin_engine/skin_tokens.c b/apps/gui/skin_engine/skin_tokens.c index 07c1dbeccc..879262f054 100644 --- a/apps/gui/skin_engine/skin_tokens.c +++ b/apps/gui/skin_engine/skin_tokens.c | |||
@@ -60,6 +60,7 @@ | |||
60 | #include "pcm_record.h" | 60 | #include "pcm_record.h" |
61 | #endif | 61 | #endif |
62 | #include "language.h" | 62 | #include "language.h" |
63 | #include "usb.h" | ||
63 | 64 | ||
64 | static char* get_codectype(const struct mp3entry* id3) | 65 | static char* get_codectype(const struct mp3entry* id3) |
65 | { | 66 | { |
@@ -547,6 +548,12 @@ const char *get_token_value(struct gui_wps *gwps, | |||
547 | } | 548 | } |
548 | } | 549 | } |
549 | #endif | 550 | #endif |
551 | #ifdef HAVE_USB_POWER | ||
552 | case WPS_TOKEN_USB_POWERED: | ||
553 | if (usb_powered()) | ||
554 | return "u"; | ||
555 | return NULL; | ||
556 | #endif | ||
550 | case WPS_TOKEN_BATTERY_SLEEPTIME: | 557 | case WPS_TOKEN_BATTERY_SLEEPTIME: |
551 | { | 558 | { |
552 | if (get_sleep_timer() == 0) | 559 | if (get_sleep_timer() == 0) |
@@ -1129,10 +1136,9 @@ const char *get_token_value(struct gui_wps *gwps, | |||
1129 | return buf; | 1136 | return buf; |
1130 | #endif | 1137 | #endif |
1131 | case WPS_TOKEN_REC_MONO: | 1138 | case WPS_TOKEN_REC_MONO: |
1132 | if (intval) | 1139 | if (!global_settings.rec_channels) |
1133 | *intval = global_settings.rec_channels?2:1; | 1140 | return "m"; |
1134 | snprintf(buf, buf_size, "%s", !global_settings.rec_channels?"m":'\0'); | 1141 | return NULL; |
1135 | return buf; | ||
1136 | 1142 | ||
1137 | #endif /* HAVE_RECORDING */ | 1143 | #endif /* HAVE_RECORDING */ |
1138 | case WPS_TOKEN_CURRENT_SCREEN: | 1144 | case WPS_TOKEN_CURRENT_SCREEN: |