diff options
author | Kenneth Zhou <knthzh@gmail.com> | 2014-06-18 19:55:40 -0400 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-06-26 19:37:25 +0200 |
commit | cb250d490c14872f03bb0320179e48d05fe2539d (patch) | |
tree | dd27e22fcbb6e306175d041eb2b2c714b7079645 /osdep/path.h | |
parent | 8bb7d427e2180067f13f8dc5c5105029e9e00be7 (diff) | |
download | mpv-cb250d490c14872f03bb0320179e48d05fe2539d.tar.bz2 mpv-cb250d490c14872f03bb0320179e48d05fe2539d.tar.xz |
Basic xdg directory implementation
Search $XDG_CONFIG_HOME and $XDG_CONFIG_DIRS for config files.
This also negates the need to have separate user and global variants of
mp_find_config_file()
Closes #864, #109.
Signed-off-by: wm4 <wm4@nowhere>
Diffstat (limited to 'osdep/path.h')
-rw-r--r-- | osdep/path.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/osdep/path.h b/osdep/path.h index 91afbce604..c2fe2ba303 100644 --- a/osdep/path.h +++ b/osdep/path.h @@ -1,12 +1,19 @@ #ifndef OSDEP_PATH_H #define OSDEP_PATH_H +#define MAX_CONFIG_PATHS 32 + struct mpv_global; -char *mp_get_win_config_path(const char *filename); +// Windows config directories +char *mp_get_win_exe_dir(void *talloc_ctx); +char *mp_get_win_exe_subdir(void *talloc_ctx); +char *mp_get_win_app_dir(void *talloc_ctx); + +void mp_add_win_config_dirs(void *talloc_ctx, struct mpv_global *global, + char **dirs, int i); -// Returns absolute path of a resource file in a Mac OS X application bundle. -char *mp_get_macosx_bundled_path(void *talloc_ctx, struct mpv_global *global, - const char *filename); +// Returns Mac OS X application bundle directory. +char *mp_get_macosx_bundle_dir(void *talloc_ctx); #endif |