mirror of https://github.com/mpv-player/mpv
path: do not use old_home for win32 exe dir
Apparently mpv supports loading config files from the same directory as the mpv.exe. This is a fallback of some sort. It used the old_home mechanism. I want to add a warning if old_home exists, but that would always show the warning on win32. Obviously we don't want that. Add a separate exe_dir entry to deal with that. Untested, but probably works.
This commit is contained in:
parent
269f0e743e
commit
c3694f0acb
|
@ -438,6 +438,8 @@ Name Meaning
|
||||||
``~~global/`` the global config path, if available (not on win32)
|
``~~global/`` the global config path, if available (not on win32)
|
||||||
``~~osxbundle/`` the OSX bundle resource path (OSX only)
|
``~~osxbundle/`` the OSX bundle resource path (OSX only)
|
||||||
``~~desktop/`` the path to the desktop (win32, OSX)
|
``~~desktop/`` the path to the desktop (win32, OSX)
|
||||||
|
``~~exe_dir`` win32 only: the path to the directory containing the exe (for
|
||||||
|
config file purposes; ``$MPV_HOME`` overrides it)
|
||||||
``~~old_home`` do not use
|
``~~old_home`` do not use
|
||||||
================ ===============================================================
|
================ ===============================================================
|
||||||
|
|
||||||
|
|
|
@ -59,6 +59,7 @@ static const char *const config_dirs[] = {
|
||||||
"home",
|
"home",
|
||||||
"old_home",
|
"old_home",
|
||||||
"osxbundle",
|
"osxbundle",
|
||||||
|
"exe_dir"
|
||||||
"global",
|
"global",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -90,7 +90,7 @@ const char *mp_get_platform_path_win(void *talloc_ctx, const char *type)
|
||||||
} else {
|
} else {
|
||||||
if (strcmp(type, "home") == 0)
|
if (strcmp(type, "home") == 0)
|
||||||
return mp_get_win_app_dir(talloc_ctx);
|
return mp_get_win_app_dir(talloc_ctx);
|
||||||
if (strcmp(type, "old_home") == 0)
|
if (strcmp(type, "exe_dir") == 0)
|
||||||
return mp_get_win_exe_dir(talloc_ctx);
|
return mp_get_win_exe_dir(talloc_ctx);
|
||||||
// Not really true, but serves as a way to return a lowest-priority dir.
|
// Not really true, but serves as a way to return a lowest-priority dir.
|
||||||
if (strcmp(type, "global") == 0)
|
if (strcmp(type, "global") == 0)
|
||||||
|
|
Loading…
Reference in New Issue