示例#1
0
文件: path-win.c 项目: 0x0all/mpv
int mp_add_win_config_dirs(struct mpv_global *global, char **dirs, int i)
{
    void *talloc_ctx = dirs;
    if ((dirs[i] = mp_get_win_app_dir(talloc_ctx)))
        i++;
    if ((dirs[i] = mp_get_win_exe_dir(talloc_ctx)))
        i++;
    if ((dirs[i] = mp_get_win_exe_subdir(talloc_ctx)))
        i++;
    return i;
}
示例#2
0
文件: path-win.c 项目: AppleNuts/mpv
const char *mp_get_platform_path_win(void *talloc_ctx, const char *type)
{
    if (strcmp(type, "home") == 0)
        return mp_get_win_app_dir(talloc_ctx);
    if (strcmp(type, "old_home") == 0)
        return mp_get_win_exe_dir(talloc_ctx);
    // Not really true, but serves as a way to return a lowest-priority dir.
    if (strcmp(type, "global") == 0)
        return mp_get_win_exe_subdir(talloc_ctx);
    if (strcmp(type, "desktop") == 0)
        return mp_get_win_shell_dir(talloc_ctx, CSIDL_DESKTOPDIRECTORY);
    return NULL;
}
示例#3
0
文件: path-win.c 项目: AppleNuts/mpv
static char *mp_get_win_exe_subdir(void *talloc_ctx)
{
    return talloc_asprintf(talloc_ctx, "%s/mpv", mp_get_win_exe_dir(talloc_ctx));
}