From 2df3a5b04c40d548391c69c18780fefd420fac02 Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Thu, 17 Sep 2020 14:53:29 -0400 Subject: Headphone / lineout pause/resume #FS13237 Allow Lineout to behave like headphone port in regards to plug/unplug pause/resume Change-Id: I9cb2c9c40e0bdf3bf7e1e272164acd343f6b3850 --- apps/root_menu.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'apps/root_menu.c') 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) { -- cgit v1.2.3