From 49666660628d6c5eab843b296dd3b5f89806c5a6 Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Sun, 22 Nov 2009 19:09:54 +0000 Subject: fix mono recording token, Add %bu - usb powered token git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23713 a1c6a512-1295-4272-9138-f99709370657 --- apps/gui/skin_engine/skin_tokens.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'apps/gui/skin_engine/skin_tokens.c') 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 @@ #include "pcm_record.h" #endif #include "language.h" +#include "usb.h" static char* get_codectype(const struct mp3entry* id3) { @@ -546,6 +547,12 @@ const char *get_token_value(struct gui_wps *gwps, return NULL; } } +#endif +#ifdef HAVE_USB_POWER + case WPS_TOKEN_USB_POWERED: + if (usb_powered()) + return "u"; + return NULL; #endif case WPS_TOKEN_BATTERY_SLEEPTIME: { @@ -1129,10 +1136,9 @@ const char *get_token_value(struct gui_wps *gwps, return buf; #endif case WPS_TOKEN_REC_MONO: - if (intval) - *intval = global_settings.rec_channels?2:1; - snprintf(buf, buf_size, "%s", !global_settings.rec_channels?"m":'\0'); - return buf; + if (!global_settings.rec_channels) + return "m"; + return NULL; #endif /* HAVE_RECORDING */ case WPS_TOKEN_CURRENT_SCREEN: -- cgit v1.2.3