summaryrefslogtreecommitdiffstats
path: root/player/configfiles.c
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2022-11-07 18:35:43 -0600
committerDudemanguy <random342@airmail.cc>2023-05-09 20:37:17 +0000
commit5158b85b21b9316b610ab59ba65da36144e03b9a (patch)
treeb5765fbb2910f7a54591923b974bc6a3575ce835 /player/configfiles.c
parentbaa9d56481fe0f7633c77d0e7ee6ffd33b3a3783 (diff)
downloadmpv-5158b85b21b9316b610ab59ba65da36144e03b9a.tar.bz2
mpv-5158b85b21b9316b610ab59ba65da36144e03b9a.tar.xz
path: expand internal path selection API to allow for additional types
Currently, nothing new is actually implemented but the idea is simply to just pass a type string all the way up from mp_find_user_file down to actually getting the platform path. This allows for selecting different directories besides the user's native config directory. See the next commit for an implementation.
Diffstat (limited to 'player/configfiles.c')
-rw-r--r--player/configfiles.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/player/configfiles.c b/player/configfiles.c
index 41c22ed2b9..9de7e36ec7 100644
--- a/player/configfiles.c
+++ b/player/configfiles.c
@@ -63,7 +63,7 @@ void mp_parse_cfgfiles(struct MPContext *mpctx)
{
struct MPOpts *opts = mpctx->opts;
- mp_mk_config_dir(mpctx->global, "");
+ mp_mk_user_dir(mpctx->global, "home", "");
char *p1 = mp_get_user_path(NULL, mpctx->global, "~~home/");
char *p2 = mp_get_user_path(NULL, mpctx->global, "~~old_home/");
@@ -226,7 +226,7 @@ static char *mp_get_playback_resume_config_filename(struct MPContext *mpctx,
if (!mpctx->cached_watch_later_configdir) {
mpctx->cached_watch_later_configdir =
- mp_find_user_config_file(mpctx, mpctx->global, MP_WATCH_LATER_CONF);
+ mp_find_user_file(mpctx, mpctx->global, "home", MP_WATCH_LATER_CONF);
}
if (mpctx->cached_watch_later_configdir)
@@ -292,7 +292,7 @@ void mp_write_watch_later_conf(struct MPContext *mpctx)
if (!conffile)
goto exit;
- mp_mk_config_dir(mpctx->global, mpctx->cached_watch_later_configdir);
+ mp_mk_user_dir(mpctx->global, "home", mpctx->cached_watch_later_configdir);
MP_INFO(mpctx, "Saving state.\n");