From ad2199128da4a689be374e92aab57ac2c9fa76b9 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 21 Dec 2013 20:45:19 +0100 Subject: path lookup functions: mp_msg conversions There's a single mp_msg() in path.c, but all path lookup functions seem to depend on it, so we get a rat-tail of stuff we have to change. This is probably a good thing though, because we can have the path lookup functions also access options, so we could allow overriding the default config path, or ignore the MPV_HOME environment variable, and such things. Also take the chance to consistently add talloc_ctx parameters to the path lookup functions. Also, this change causes a big mess on configfiles.c. It's the same issue: everything suddenly needs a (different) context argument. Make it less wild by providing a mp_load_auto_profiles() function, which isolates most of it to configfiles.c. --- sub/find_subfiles.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sub/find_subfiles.c') diff --git a/sub/find_subfiles.c b/sub/find_subfiles.c index 84b7cd1bfe..e5577c3912 100644 --- a/sub/find_subfiles.c +++ b/sub/find_subfiles.c @@ -237,7 +237,7 @@ struct subfn *find_text_subtitles(struct mpv_global *global, const char *fname) } // Load subtitles in ~/.mpv/sub limiting sub fuzziness - char *mp_subdir = mp_find_user_config_file("sub/"); + char *mp_subdir = mp_find_user_config_file(NULL, global, "sub/"); if (mp_subdir) append_dir_subtitles(global, &slist, &n, bstr0(mp_subdir), fname, 1); talloc_free(mp_subdir); -- cgit v1.2.3