summaryrefslogtreecommitdiff
path: root/apps/root_menu.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/root_menu.c')
-rw-r--r--apps/root_menu.c26
1 files changed, 22 insertions, 4 deletions
diff --git a/apps/root_menu.c b/apps/root_menu.c
index e606d5cd68..7c75b12586 100644
--- a/apps/root_menu.c
+++ b/apps/root_menu.c
@@ -900,9 +900,25 @@ static int root_menu_setup_screens(void)
900 return new_screen; 900 return new_screen;
901} 901}
902 902
903static int browser_default(void)
904{
905 switch (global_settings.browser_default)
906 {
907#ifdef HAVE_TAGCACHE
908 case BROWSER_DEFAULT_DB:
909 return GO_TO_DBBROWSER;
910#endif
911 case BROWSER_DEFAULT_PL_CAT:
912 return GO_TO_PLAYLISTS_SCREEN;
913 case BROWSER_DEFAULT_FILES:
914 default:
915 return GO_TO_FILEBROWSER;
916 }
917}
918
903void root_menu(void) 919void root_menu(void)
904{ 920{
905 int previous_browser = GO_TO_FILEBROWSER; 921 int previous_browser = browser_default();
906 int selected = 0; 922 int selected = 0;
907 int shortcut_origin = GO_TO_ROOT; 923 int shortcut_origin = GO_TO_ROOT;
908 924
@@ -932,12 +948,13 @@ void root_menu(void)
932 last_screen = GO_TO_ROOT; 948 last_screen = GO_TO_ROOT;
933 break; 949 break;
934#ifdef HAVE_TAGCACHE 950#ifdef HAVE_TAGCACHE
935 case GO_TO_FILEBROWSER:
936 case GO_TO_DBBROWSER: 951 case GO_TO_DBBROWSER:
952#endif
953 case GO_TO_FILEBROWSER:
954 case GO_TO_PLAYLISTS_SCREEN:
937 previous_browser = next_screen; 955 previous_browser = next_screen;
938 goto load_next_screen; 956 goto load_next_screen;
939 break; 957 break;
940#endif /* With !HAVE_TAGCACHE previous_browser is always GO_TO_FILEBROWSER */
941#if CONFIG_TUNER 958#if CONFIG_TUNER
942 case GO_TO_WPS: 959 case GO_TO_WPS:
943 case GO_TO_FM: 960 case GO_TO_FM:
@@ -1030,7 +1047,8 @@ void root_menu(void)
1030 last_screen = GO_TO_PLUGIN; 1047 last_screen = GO_TO_PLUGIN;
1031 } 1048 }
1032 } 1049 }
1033 previous_browser = (next_screen != GO_TO_WPS) ? GO_TO_FILEBROWSER : GO_TO_PLUGIN; 1050 previous_browser = (next_screen != GO_TO_WPS) ? browser_default() :
1051 GO_TO_PLUGIN;
1034 break; 1052 break;
1035 } 1053 }
1036 default: 1054 default: