summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrandon Low <lostlogic@rockbox.org>2006-03-18 09:07:51 +0000
committerBrandon Low <lostlogic@rockbox.org>2006-03-18 09:07:51 +0000
commit2457de11b6d9890bd0acec0cf5fd4f9a07c256dd (patch)
tree6b0685338d5791cb6578c2a05dc693f333166502
parent396f163e3620b1bbe56501feecf9547cf40aba86 (diff)
downloadrockbox-2457de11b6d9890bd0acec0cf5fd4f9a07c256dd.tar.gz
rockbox-2457de11b6d9890bd0acec0cf5fd4f9a07c256dd.tar.bz2
rockbox-2457de11b6d9890bd0acec0cf5fd4f9a07c256dd.zip
Use plugged backlight timeout when usb powered
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9086 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/backlight.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/firmware/backlight.c b/firmware/backlight.c
index 1a7ea8e7f0..cfacbef28a 100644
--- a/firmware/backlight.c
+++ b/firmware/backlight.c
@@ -332,7 +332,11 @@ void backlight_thread(void)
#ifdef HAVE_REMOTE_LCD
case REMOTE_BACKLIGHT_ON:
#ifdef HAVE_CHARGING
- if (charger_inserted())
+ if (charger_inserted()
+#ifdef HAVE_USB_POWER
+ || usb_powered()
+#endif
+ )
remote_backlight_timer = remote_backlight_timeout_plugged;
else
#endif
@@ -357,7 +361,11 @@ void backlight_thread(void)
#endif /* HAVE_REMOTE_LCD */
case BACKLIGHT_ON:
#ifdef HAVE_CHARGING
- if (charger_inserted())
+ if (charger_inserted()
+#ifdef HAVE_USB_POWER
+ || usb_powered()
+#endif
+ )
backlight_timer = backlight_timeout_plugged;
else
#endif