summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorFrank Gevaerts <frank@gevaerts.be>2012-12-26 17:51:43 +0100
committerFrank Gevaerts <frank@gevaerts.be>2012-12-26 17:52:15 +0100
commit64d048be2bf6c3977a29bd03a47b19c2c5cf58cd (patch)
treed1619749e17dd064ae68cb356ce3853c48f80587 /apps
parent5caaf70f345ee1b2a49cffe4dc779e1d810ba2cc (diff)
downloadrockbox-64d048be2bf6c3977a29bd03a47b19c2c5cf58cd.tar.gz
rockbox-64d048be2bf6c3977a29bd03a47b19c2c5cf58cd.tar.bz2
rockbox-64d048be2bf6c3977a29bd03a47b19c2c5cf58cd.zip
Make code that depends on HAVE_USB_CHARGING_ENABLE check HAVE_USBSTACK.
This fixes building without HAVE_USBSTACK Change-Id: If8fec87a3ed4de583864ed2bab69be1f2ad8ac52
Diffstat (limited to 'apps')
-rw-r--r--apps/menus/settings_menu.c4
-rw-r--r--apps/settings.c2
-rw-r--r--apps/settings.h2
-rw-r--r--apps/settings_list.c2
4 files changed, 5 insertions, 5 deletions
diff --git a/apps/menus/settings_menu.c b/apps/menus/settings_menu.c
index 95423a20fa..23807e2adc 100644
--- a/apps/menus/settings_menu.c
+++ b/apps/menus/settings_menu.c
@@ -173,7 +173,7 @@ MENUITEM_SETTING(battery_capacity, &global_settings.battery_capacity, NULL);
#if BATTERY_TYPES_COUNT > 1
MENUITEM_SETTING(battery_type, &global_settings.battery_type, NULL);
#endif
-#ifdef HAVE_USB_CHARGING_ENABLE
+#if defined (HAVE_USBSTACK) && defined(HAVE_USB_CHARGING_ENABLE)
static int usbcharging_callback(int action,const struct menu_item_ex *this_item)
{
(void)this_item;
@@ -194,7 +194,7 @@ MAKE_MENU(battery_menu, ID2P(LANG_BATTERY_MENU), 0, Icon_NOICON,
#if BATTERY_TYPES_COUNT > 1
&battery_type,
#endif
-#ifdef HAVE_USB_CHARGING_ENABLE
+#if defined (HAVE_USBSTACK) && defined(HAVE_USB_CHARGING_ENABLE)
&usb_charging,
#endif
);
diff --git a/apps/settings.c b/apps/settings.c
index e2a6efa3d8..a0f219efec 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -1020,7 +1020,7 @@ void settings_apply(bool read_disk)
touchpad_set_sensitivity(global_settings.touchpad_sensitivity);
#endif
-#ifdef HAVE_USB_CHARGING_ENABLE
+#if defined (HAVE_USBSTACK) && defined(HAVE_USB_CHARGING_ENABLE)
usb_charging_enable(global_settings.usb_charging);
#endif
diff --git a/apps/settings.h b/apps/settings.h
index 2af29ce423..94967c3c4c 100644
--- a/apps/settings.h
+++ b/apps/settings.h
@@ -619,7 +619,7 @@ struct user_settings
#ifdef HAVE_SPDIF_POWER
bool spdif_enable; /* S/PDIF power on/off */
#endif
-#ifdef HAVE_USB_CHARGING_ENABLE
+#if defined (HAVE_USBSTACK) && defined(HAVE_USB_CHARGING_ENABLE)
int usb_charging;
#endif
diff --git a/apps/settings_list.c b/apps/settings_list.c
index f27c13c4f1..9b1fea4b04 100644
--- a/apps/settings_list.c
+++ b/apps/settings_list.c
@@ -1690,7 +1690,7 @@ const struct settings_list settings[] = {
#ifdef HAVE_LCD_BITMAP
TEXT_SETTING(0,kbd_file,"kbd","-",ROCKBOX_DIR "/",".kbd"),
#endif
-#ifdef HAVE_USB_CHARGING_ENABLE
+#if defined (HAVE_USBSTACK) && defined(HAVE_USB_CHARGING_ENABLE)
CHOICE_SETTING(0, usb_charging, LANG_USB_CHARGING, 1, "usb charging",
"off,on,force", NULL, 3, ID2P(LANG_SET_BOOL_NO),
ID2P(LANG_SET_BOOL_YES), ID2P(LANG_FORCE)),