summaryrefslogtreecommitdiff
path: root/apps/tagtree.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/tagtree.c')
-rw-r--r--apps/tagtree.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/apps/tagtree.c b/apps/tagtree.c
index 454875ded2..74f0021d6a 100644
--- a/apps/tagtree.c
+++ b/apps/tagtree.c
@@ -58,7 +58,8 @@
58 58
59#define str_or_empty(x) (x ? x : "(NULL)") 59#define str_or_empty(x) (x ? x : "(NULL)")
60 60
61#define FILE_SEARCH_INSTRUCTIONS ROCKBOX_DIR "/tagnavi.config" 61#define TAGNAVI_DEFAULT_CONFIG ROCKBOX_DIR "/tagnavi.config"
62#define TAGNAVI_USER_CONFIG ROCKBOX_DIR "/tagnavi_user.config"
62 63
63static int tagtree_play_folder(struct tree_context* c); 64static int tagtree_play_folder(struct tree_context* c);
64 65
@@ -1262,7 +1263,14 @@ void tagtree_init(void)
1262 if (tagtree_handle < 0) 1263 if (tagtree_handle < 0)
1263 panicf("tagtree OOM"); 1264 panicf("tagtree OOM");
1264 1265
1265 if (!parse_menu(FILE_SEARCH_INSTRUCTIONS)) 1266 /* Use the user tagnavi config if present, otherwise use the default. */
1267 const char* tagnavi_file;
1268 if(file_exists(TAGNAVI_USER_CONFIG))
1269 tagnavi_file = TAGNAVI_USER_CONFIG;
1270 else
1271 tagnavi_file = TAGNAVI_DEFAULT_CONFIG;
1272
1273 if (!parse_menu(tagnavi_file))
1266 { 1274 {
1267 tagtree_unload(NULL); 1275 tagtree_unload(NULL);
1268 return; 1276 return;