mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 21:25:19 -05:00
fix mono recording token,
Add %bu - usb powered token git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23713 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
360d00f600
commit
4966666062
3 changed files with 14 additions and 4 deletions
|
|
@ -201,6 +201,9 @@ static const struct wps_tag all_tags[] = {
|
||||||
#if CONFIG_CHARGING
|
#if CONFIG_CHARGING
|
||||||
{ WPS_TOKEN_BATTERY_CHARGER_CONNECTED,"bp", WPS_REFRESH_DYNAMIC, NULL },
|
{ WPS_TOKEN_BATTERY_CHARGER_CONNECTED,"bp", WPS_REFRESH_DYNAMIC, NULL },
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef HAVE_USB_POWER
|
||||||
|
{ WPS_TOKEN_USB_POWERED, "bu", WPS_REFRESH_DYNAMIC, NULL },
|
||||||
|
#endif
|
||||||
|
|
||||||
{ WPS_TOKEN_RTC_PRESENT , "cc", WPS_REFRESH_STATIC, NULL },
|
{ WPS_TOKEN_RTC_PRESENT , "cc", WPS_REFRESH_STATIC, NULL },
|
||||||
{ WPS_TOKEN_RTC_DAY_OF_MONTH, "cd", WPS_RTC_REFRESH, NULL },
|
{ WPS_TOKEN_RTC_DAY_OF_MONTH, "cd", WPS_RTC_REFRESH, NULL },
|
||||||
|
|
|
||||||
|
|
@ -60,6 +60,7 @@
|
||||||
#include "pcm_record.h"
|
#include "pcm_record.h"
|
||||||
#endif
|
#endif
|
||||||
#include "language.h"
|
#include "language.h"
|
||||||
|
#include "usb.h"
|
||||||
|
|
||||||
static char* get_codectype(const struct mp3entry* id3)
|
static char* get_codectype(const struct mp3entry* id3)
|
||||||
{
|
{
|
||||||
|
|
@ -546,6 +547,12 @@ const char *get_token_value(struct gui_wps *gwps,
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_USB_POWER
|
||||||
|
case WPS_TOKEN_USB_POWERED:
|
||||||
|
if (usb_powered())
|
||||||
|
return "u";
|
||||||
|
return NULL;
|
||||||
#endif
|
#endif
|
||||||
case WPS_TOKEN_BATTERY_SLEEPTIME:
|
case WPS_TOKEN_BATTERY_SLEEPTIME:
|
||||||
{
|
{
|
||||||
|
|
@ -1129,10 +1136,9 @@ const char *get_token_value(struct gui_wps *gwps,
|
||||||
return buf;
|
return buf;
|
||||||
#endif
|
#endif
|
||||||
case WPS_TOKEN_REC_MONO:
|
case WPS_TOKEN_REC_MONO:
|
||||||
if (intval)
|
if (!global_settings.rec_channels)
|
||||||
*intval = global_settings.rec_channels?2:1;
|
return "m";
|
||||||
snprintf(buf, buf_size, "%s", !global_settings.rec_channels?"m":'\0');
|
return NULL;
|
||||||
return buf;
|
|
||||||
|
|
||||||
#endif /* HAVE_RECORDING */
|
#endif /* HAVE_RECORDING */
|
||||||
case WPS_TOKEN_CURRENT_SCREEN:
|
case WPS_TOKEN_CURRENT_SCREEN:
|
||||||
|
|
|
||||||
|
|
@ -61,6 +61,7 @@ enum wps_token_type {
|
||||||
WPS_TOKEN_BATTERY_CHARGER_CONNECTED,
|
WPS_TOKEN_BATTERY_CHARGER_CONNECTED,
|
||||||
WPS_TOKEN_BATTERY_CHARGING,
|
WPS_TOKEN_BATTERY_CHARGING,
|
||||||
WPS_TOKEN_BATTERY_SLEEPTIME,
|
WPS_TOKEN_BATTERY_SLEEPTIME,
|
||||||
|
WPS_TOKEN_USB_POWERED,
|
||||||
|
|
||||||
/* Sound */
|
/* Sound */
|
||||||
TOKEN_MARKER_SOUND,
|
TOKEN_MARKER_SOUND,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue