diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2006-09-26 10:03:56 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2006-09-26 10:03:56 +0000 |
commit | 537c7546f946d266e55fdbce03558352a3342908 (patch) | |
tree | 9e594c9d40ec54047fa858472f737bc4d7b7d406 /apps/tree.c | |
parent | 9f960e405f72e1f624797547e1ad8e9584206118 (diff) |
Patch #4899 by Robert Keevil - Automatic pause on iPod when removing the headphones
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11057 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/tree.c')
-rw-r--r-- | apps/tree.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/apps/tree.c b/apps/tree.c index 3ee3061540..0e2dcb6c87 100644 --- a/apps/tree.c +++ b/apps/tree.c @@ -466,7 +466,20 @@ static void start_resume(bool just_powered_on) /* always resume? */ if ( global_settings.resume || ! just_powered_on) - do_resume = true; +#ifdef HAVE_HEADPHONE_DETECTION + { + if ( just_powered_on ) + { + if ( !global_settings.unplug_autoresume + || headphones_inserted() ) + do_resume = true; + } + else + do_resume = true; + } +#else + do_resume = true; +#endif if (! do_resume) return; |