From b2f756c80e71fb9ceb4fbd94f445ebbbff82703f Mon Sep 17 00:00:00 2001 From: Hoyon Mak Date: Fri, 9 Jun 2017 18:03:39 +0100 Subject: scripting: expand --script filename for C plugins --- player/scripting.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'player/scripting.c') diff --git a/player/scripting.c b/player/scripting.c index 092404231d..46379b4151 100644 --- a/player/scripting.c +++ b/player/scripting.c @@ -215,8 +215,11 @@ void mp_load_scripts(struct MPContext *mpctx) // Load scripts from options char **files = mpctx->opts->script_files; for (int n = 0; files && files[n]; n++) { - if (files[n][0]) - mp_load_script(mpctx, files[n]); + if (files[n][0]) { + char *path = mp_get_user_path(NULL, mpctx->global, files[n]); + mp_load_script(mpctx, path); + talloc_free(path); + } } if (!mpctx->opts->auto_load_scripts) return; -- cgit v1.2.3