diff options
Diffstat (limited to 'osdep')
-rw-r--r-- | osdep/path-win.c | 13 | ||||
-rw-r--r-- | osdep/path.h | 8 |
2 files changed, 7 insertions, 14 deletions
diff --git a/osdep/path-win.c b/osdep/path-win.c index e35bab37a2..eb88a9cfc4 100644 --- a/osdep/path-win.c +++ b/osdep/path-win.c @@ -24,7 +24,7 @@ // Warning: do not use PATH_MAX. Cygwin messed it up. -char *mp_get_win_exe_dir(void *talloc_ctx) +static char *mp_get_win_exe_dir(void *talloc_ctx) { wchar_t w_exedir[MAX_PATH + 1] = {0}; @@ -41,12 +41,13 @@ char *mp_get_win_exe_dir(void *talloc_ctx) return mp_to_utf8(talloc_ctx, w_exedir); } -char *mp_get_win_exe_subdir(void *talloc_ctx) + +static char *mp_get_win_exe_subdir(void *talloc_ctx) { return talloc_asprintf(talloc_ctx, "%s/mpv", mp_get_win_exe_dir(talloc_ctx)); } -char *mp_get_win_app_dir(void *talloc_ctx) +static char *mp_get_win_app_dir(void *talloc_ctx) { wchar_t w_appdir[MAX_PATH + 1] = {0}; @@ -57,11 +58,9 @@ char *mp_get_win_app_dir(void *talloc_ctx) return talloc_asprintf(talloc_ctx, "%s/mpv", mp_to_utf8(talloc_ctx, w_appdir)); } - - -void mp_add_win_config_dirs(void *talloc_ctx, struct mpv_global *global, - char **dirs, int i) +void mp_add_win_config_dirs(struct mpv_global *global, char **dirs, int i) { + void *talloc_ctx = dirs; if ((dirs[i] = mp_get_win_exe_subdir(talloc_ctx))) i++; if ((dirs[i] = mp_get_win_exe_dir(talloc_ctx))) diff --git a/osdep/path.h b/osdep/path.h index c2fe2ba303..c09bedceb0 100644 --- a/osdep/path.h +++ b/osdep/path.h @@ -5,13 +5,7 @@ struct mpv_global; -// 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); +void mp_add_win_config_dirs(struct mpv_global *global, char **dirs, int i); // Returns Mac OS X application bundle directory. char *mp_get_macosx_bundle_dir(void *talloc_ctx); |