summaryrefslogtreecommitdiff
path: root/apps/debug_menu.c
diff options
context:
space:
mode:
authorBrandon Low <lostlogic@rockbox.org>2006-03-19 01:01:03 +0000
committerBrandon Low <lostlogic@rockbox.org>2006-03-19 01:01:03 +0000
commit5650b70517e2de03a7ab6b07a1532094a52fe0c3 (patch)
treefa1e5ad57a18ac4212ff3b8a2af7b9f917479ae6 /apps/debug_menu.c
parenta6fb393507ef2f8d91bd460b621ddcb63439dfbc (diff)
downloadrockbox-5650b70517e2de03a7ab6b07a1532094a52fe0c3.zip
rockbox-5650b70517e2de03a7ab6b07a1532094a52fe0c3.tar.gz
rockbox-5650b70517e2de03a7ab6b07a1532094a52fe0c3.tar.bz2
rockbox-5650b70517e2de03a7ab6b07a1532094a52fe0c3.tar.xz
Fix some problems with using USB_POWERED as a charging state separate from charger_inserted
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9109 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/debug_menu.c')
-rw-r--r--apps/debug_menu.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index 8cf4103..9ab5050 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -31,6 +31,7 @@
#include "adc.h"
#include "mas.h"
#include "power.h"
+#include "usb.h"
#include "rtc.h"
#include "debug.h"
#include "thread.h"
@@ -1470,7 +1471,11 @@ static bool view_runtime(void)
if (state & 1) {
#ifdef HAVE_CHARGING
- if (charger_inserted())
+ if (charger_inserted()
+#ifdef HAVE_USB_POWER
+ || usb_powered()
+#endif
+ )
{
global_settings.runtime = 0;
}