summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/lang/english.lang2
-rw-r--r--apps/menus/settings_menu.c10
-rw-r--r--apps/plugin.h4
-rw-r--r--apps/screens.c6
-rw-r--r--apps/settings.c4
-rw-r--r--apps/settings.h4
-rw-r--r--apps/settings_list.c4
7 files changed, 10 insertions, 24 deletions
diff --git a/apps/lang/english.lang b/apps/lang/english.lang
index 4a8d81dfbc..60e36db79f 100644
--- a/apps/lang/english.lang
+++ b/apps/lang/english.lang
@@ -8321,7 +8321,7 @@
8321</phrase> 8321</phrase>
8322<phrase> 8322<phrase>
8323 id: LANG_USB_CHARGING 8323 id: LANG_USB_CHARGING
8324 desc: in Battery menu 8324 desc: in Battery menu, TODO: cleanup unless HAVE_USB_CHARGING_ENABLE defined
8325 user: 8325 user:
8326 <source> 8326 <source>
8327 *: none 8327 *: none
diff --git a/apps/menus/settings_menu.c b/apps/menus/settings_menu.c
index 6bb032d169..d05726ea44 100644
--- a/apps/menus/settings_menu.c
+++ b/apps/menus/settings_menu.c
@@ -144,8 +144,7 @@ MENUITEM_SETTING(battery_capacity, &global_settings.battery_capacity, NULL);
144#if BATTERY_TYPES_COUNT > 1 144#if BATTERY_TYPES_COUNT > 1
145MENUITEM_SETTING(battery_type, &global_settings.battery_type, NULL); 145MENUITEM_SETTING(battery_type, &global_settings.battery_type, NULL);
146#endif 146#endif
147#ifdef HAVE_USB_POWER 147#ifdef HAVE_USB_CHARGING_ENABLE
148#if CONFIG_CHARGING
149static int usbcharging_callback(int action,const struct menu_item_ex *this_item) 148static int usbcharging_callback(int action,const struct menu_item_ex *this_item)
150{ 149{
151 (void)this_item; 150 (void)this_item;
@@ -158,8 +157,7 @@ static int usbcharging_callback(int action,const struct menu_item_ex *this_item)
158 return action; 157 return action;
159} 158}
160MENUITEM_SETTING(usb_charging, &global_settings.usb_charging, usbcharging_callback); 159MENUITEM_SETTING(usb_charging, &global_settings.usb_charging, usbcharging_callback);
161#endif 160#endif /* HAVE_USB_CHARGING_ENABLE */
162#endif
163MAKE_MENU(battery_menu, ID2P(LANG_BATTERY_MENU), 0, Icon_NOICON, 161MAKE_MENU(battery_menu, ID2P(LANG_BATTERY_MENU), 0, Icon_NOICON,
164#if BATTERY_CAPACITY_INC > 0 162#if BATTERY_CAPACITY_INC > 0
165 &battery_capacity, 163 &battery_capacity,
@@ -167,11 +165,9 @@ MAKE_MENU(battery_menu, ID2P(LANG_BATTERY_MENU), 0, Icon_NOICON,
167#if BATTERY_TYPES_COUNT > 1 165#if BATTERY_TYPES_COUNT > 1
168 &battery_type, 166 &battery_type,
169#endif 167#endif
170#ifdef HAVE_USB_POWER 168#ifdef HAVE_USB_CHARGING_ENABLE
171#if CONFIG_CHARGING
172 &usb_charging, 169 &usb_charging,
173#endif 170#endif
174#endif
175 ); 171 );
176/* Disk */ 172/* Disk */
177#ifdef HAVE_DISK_STORAGE 173#ifdef HAVE_DISK_STORAGE
diff --git a/apps/plugin.h b/apps/plugin.h
index 464614dcf9..99a76ad399 100644
--- a/apps/plugin.h
+++ b/apps/plugin.h
@@ -131,12 +131,12 @@ void* plugin_get_buffer(size_t *buffer_size);
131#define PLUGIN_MAGIC 0x526F634B /* RocK */ 131#define PLUGIN_MAGIC 0x526F634B /* RocK */
132 132
133/* increase this every time the api struct changes */ 133/* increase this every time the api struct changes */
134#define PLUGIN_API_VERSION 126 134#define PLUGIN_API_VERSION 127
135 135
136/* update this to latest version if a change to the api struct breaks 136/* update this to latest version if a change to the api struct breaks
137 backwards compatibility (and please take the opportunity to sort in any 137 backwards compatibility (and please take the opportunity to sort in any
138 new function which are "waiting" at the end of the function table) */ 138 new function which are "waiting" at the end of the function table) */
139#define PLUGIN_MIN_API_VERSION 125 139#define PLUGIN_MIN_API_VERSION 127
140 140
141/* plugin return codes */ 141/* plugin return codes */
142enum plugin_status { 142enum plugin_status {
diff --git a/apps/screens.c b/apps/screens.c
index 2bd7775569..6d16982dc4 100644
--- a/apps/screens.c
+++ b/apps/screens.c
@@ -906,11 +906,7 @@ bool view_runtime(void)
906 while(1) 906 while(1)
907 { 907 {
908#if CONFIG_CHARGING 908#if CONFIG_CHARGING
909 if (charger_inserted() 909 if (charger_inserted())
910#ifdef HAVE_USB_POWER
911 || usb_powered()
912#endif
913 )
914 { 910 {
915 global_status.runtime = 0; 911 global_status.runtime = 0;
916 } 912 }
diff --git a/apps/settings.c b/apps/settings.c
index 609cb3f93f..f8c9acd151 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -717,11 +717,9 @@ void sound_settings_apply(void)
717 sound_set(SOUND_TREBLE_CUTOFF, global_settings.treble_cutoff); 717 sound_set(SOUND_TREBLE_CUTOFF, global_settings.treble_cutoff);
718#endif 718#endif
719 719
720#ifdef HAVE_USB_POWER 720#ifdef HAVE_USB_CHARGING_ENABLE
721#if CONFIG_CHARGING
722 usb_charging_enable(global_settings.usb_charging); 721 usb_charging_enable(global_settings.usb_charging);
723#endif 722#endif
724#endif
725} 723}
726 724
727void settings_apply(bool read_disk) 725void settings_apply(bool read_disk)
diff --git a/apps/settings.h b/apps/settings.h
index be83689368..f79fb9d09e 100644
--- a/apps/settings.h
+++ b/apps/settings.h
@@ -684,11 +684,9 @@ struct user_settings
684 unsigned char kbd_file[MAX_FILENAME+1]; /* last keyboard */ 684 unsigned char kbd_file[MAX_FILENAME+1]; /* last keyboard */
685#endif 685#endif
686 686
687#ifdef HAVE_USB_POWER 687#ifdef HAVE_USB_CHARGING_ENABLE
688#if CONFIG_CHARGING
689 bool usb_charging; 688 bool usb_charging;
690#endif 689#endif
691#endif
692 690
693 bool hold_lr_for_scroll_in_list; /* hold L/R scrolls the list left/right */ 691 bool hold_lr_for_scroll_in_list; /* hold L/R scrolls the list left/right */
694#ifdef HAVE_LCD_BITMAP 692#ifdef HAVE_LCD_BITMAP
diff --git a/apps/settings_list.c b/apps/settings_list.c
index fe379ca229..2678fe0861 100644
--- a/apps/settings_list.c
+++ b/apps/settings_list.c
@@ -1310,11 +1310,9 @@ const struct settings_list settings[] = {
1310#ifdef HAVE_LCD_BITMAP 1310#ifdef HAVE_LCD_BITMAP
1311 TEXT_SETTING(0,kbd_file,"kbd","",ROCKBOX_DIR "/",".kbd"), 1311 TEXT_SETTING(0,kbd_file,"kbd","",ROCKBOX_DIR "/",".kbd"),
1312#endif 1312#endif
1313#ifdef HAVE_USB_POWER 1313#ifdef HAVE_USB_CHARGING_ENABLE
1314#if CONFIG_CHARGING
1315 OFFON_SETTING(0,usb_charging,LANG_USB_CHARGING,false,"usb charging",NULL), 1314 OFFON_SETTING(0,usb_charging,LANG_USB_CHARGING,false,"usb charging",NULL),
1316#endif 1315#endif
1317#endif
1318 OFFON_SETTING(F_BANFROMQS,cuesheet,LANG_CUESHEET_ENABLE,false,"cuesheet support", 1316 OFFON_SETTING(F_BANFROMQS,cuesheet,LANG_CUESHEET_ENABLE,false,"cuesheet support",
1319 NULL), 1317 NULL),
1320 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS, skip_length, 1318 TABLE_SETTING(F_ALLOW_ARBITRARY_VALS, skip_length,