summaryrefslogtreecommitdiffstats
path: root/apps/root_menu.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/root_menu.c')
-rw-r--r--apps/root_menu.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/apps/root_menu.c b/apps/root_menu.c
index 2a8662a170..77a092018a 100644
--- a/apps/root_menu.c
+++ b/apps/root_menu.c
@@ -767,11 +767,20 @@ void root_menu(void)
}
#endif /* HAVE_RTC_ALARM */
+#if defined(HAVE_HEADPHONE_DETECTION) || defined(HAVE_LINEOUT_DETECTION)
+ if (next_screen == GO_TO_WPS && global_settings.unplug_autoresume)
+ {
+ next_screen = GO_TO_ROOT;
#ifdef HAVE_HEADPHONE_DETECTION
- if (next_screen == GO_TO_WPS &&
- (global_settings.unplug_autoresume && !headphones_inserted() ))
- next_screen = GO_TO_ROOT;
+ if (headphones_inserted())
+ next_screen = GO_TO_WPS;
+#endif
+#ifdef HAVE_LINEOUT_DETECTION
+ if (lineout_inserted())
+ next_screen = GO_TO_WPS;
#endif
+ }
+#endif /*(HAVE_HEADPHONE_DETECTION) || (HAVE_LINEOUT_DETECTION)*/
while (true)
{