summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBoris Gjenero <dreamlayers@rockbox.org>2009-04-06 01:47:28 +0000
committerBoris Gjenero <dreamlayers@rockbox.org>2009-04-06 01:47:28 +0000
commit02b9c65ea314066b20cc4c391e6e1e69035924c9 (patch)
tree6cceac059351acb9048fdcc09fbb34e67d4d9cf6
parent843c7efaf8c953fc3bec40a7da0be3a5da9950df (diff)
downloadrockbox-02b9c65ea314066b20cc4c391e6e1e69035924c9.tar.gz
rockbox-02b9c65ea314066b20cc4c391e6e1e69035924c9.tar.bz2
rockbox-02b9c65ea314066b20cc4c391e6e1e69035924c9.zip
Fix FS#10091 - On Archos targets properly detect charger at startup, so charging screen can be entered
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20634 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/main.c b/apps/main.c
index 54ff191a3a..642ec5be08 100644
--- a/apps/main.c
+++ b/apps/main.c
@@ -422,7 +422,9 @@ static void init(void)
gui_syncstatusbar_init(&statusbars);
#if CONFIG_CHARGING && (CONFIG_CPU == SH7034)
- if (coldstart && charger_inserted()
+ /* charger_inserted() can't be used here because power_thread()
+ hasn't checked power_input_status() yet */
+ if (coldstart && (power_input_status() & POWER_INPUT_MAIN_CHARGER)
&& !global_settings.car_adapter_mode
#ifdef ATA_POWER_PLAYERSTYLE
&& !ide_powered() /* relies on probing result from bootloader */