From 21a5c416d5de6ef43a5e2c08ba53cb2a8cb59ae2 Mon Sep 17 00:00:00 2001 From: Philip Sequeira Date: Mon, 20 Nov 2017 16:18:54 -0500 Subject: options: add M_OPT_FILE to some more options that take files --- audio/out/ao_oss.c | 2 +- options/options.c | 14 +++++++------- video/out/gpu/video.c | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/audio/out/ao_oss.c b/audio/out/ao_oss.c index 4a1e483cfb..6a6253b933 100644 --- a/audio/out/ao_oss.c +++ b/audio/out/ao_oss.c @@ -653,7 +653,7 @@ const struct ao_driver audio_out_oss = { .oss_mixer_device = PATH_DEV_MIXER, }, .options = (const struct m_option[]) { - OPT_STRING("mixer-device", oss_mixer_device, 0), + OPT_STRING("mixer-device", oss_mixer_device, M_OPT_FILE), OPT_STRING("mixer-channel", cfg_oss_mixer_channel, 0), {0} }, diff --git a/options/options.c b/options/options.c index 4491ceb2ba..9e74821278 100644 --- a/options/options.c +++ b/options/options.c @@ -356,7 +356,7 @@ const m_option_t mp_opts[] = { OPT_FLAG("terminal", use_terminal, CONF_PRE_PARSE | UPDATE_TERM), OPT_GENERAL(char**, "msg-level", msg_levels, CONF_PRE_PARSE | UPDATE_TERM, .type = &m_option_type_msglevels), - OPT_STRING("dump-stats", dump_stats, UPDATE_TERM | CONF_PRE_PARSE), + OPT_STRING("dump-stats", dump_stats, UPDATE_TERM | CONF_PRE_PARSE | M_OPT_FILE), OPT_FLAG("msg-color", msg_color, CONF_PRE_PARSE | UPDATE_TERM), OPT_STRING("log-file", log_file, CONF_PRE_PARSE | M_OPT_FILE | UPDATE_TERM), OPT_FLAG("msg-module", msg_module, UPDATE_TERM), @@ -377,7 +377,7 @@ const m_option_t mp_opts[] = { OPT_STRINGLIST("reset-on-next-file", reset_options, 0), #if HAVE_LUA || HAVE_JAVASCRIPT - OPT_PATHLIST("scripts", script_files, M_OPT_FIXED), + OPT_PATHLIST("scripts", script_files, M_OPT_FIXED | M_OPT_FILE), OPT_CLI_ALIAS("script", "scripts-append"), OPT_KEYVALUELIST("script-opts", script_opts, 0), OPT_FLAG("load-scripts", auto_load_scripts, 0), @@ -462,7 +462,7 @@ const m_option_t mp_opts[] = { #endif // demuxer.c - select audio/sub file/demuxer - OPT_PATHLIST("audio-files", audio_files, 0), + OPT_PATHLIST("audio-files", audio_files, M_OPT_FILE), OPT_CLI_ALIAS("audio-file", "audio-files-append"), OPT_STRING("demuxer", demuxer_name, 0), OPT_STRING("audio-demuxer", audio_demuxer_name, 0), @@ -532,11 +532,11 @@ const m_option_t mp_opts[] = { // ------------------------- subtitles options -------------------- - OPT_PATHLIST("sub-files", sub_name, 0), + OPT_PATHLIST("sub-files", sub_name, M_OPT_FILE), OPT_CLI_ALIAS("sub-file", "sub-files-append"), - OPT_PATHLIST("sub-file-paths", sub_paths, 0), - OPT_PATHLIST("audio-file-paths", audiofile_paths, 0), - OPT_PATHLIST("external-files", external_files, 0), + OPT_PATHLIST("sub-file-paths", sub_paths, M_OPT_FILE), + OPT_PATHLIST("audio-file-paths", audiofile_paths, M_OPT_FILE), + OPT_PATHLIST("external-files", external_files, M_OPT_FILE), OPT_CLI_ALIAS("external-file", "external-files-append"), OPT_FLAG("autoload-files", autoload_files, 0), OPT_CHOICE("sub-auto", sub_auto, 0, diff --git a/video/out/gpu/video.c b/video/out/gpu/video.c index b0c43ef20b..ea47b308d3 100644 --- a/video/out/gpu/video.c +++ b/video/out/gpu/video.c @@ -428,7 +428,7 @@ const struct m_sub_options gl_video_conf = { ({"no", BLEND_SUBS_NO}, {"yes", BLEND_SUBS_YES}, {"video", BLEND_SUBS_VIDEO})), - OPT_PATHLIST("glsl-shaders", user_shaders, 0), + OPT_PATHLIST("glsl-shaders", user_shaders, M_OPT_FILE), OPT_CLI_ALIAS("glsl-shader", "glsl-shaders-append"), OPT_FLAG("deband", deband, 0), OPT_SUBSTRUCT("deband", deband_opts, deband_conf, 0), @@ -436,7 +436,7 @@ const struct m_sub_options gl_video_conf = { OPT_INTRANGE("gpu-tex-pad-x", tex_pad_x, 0, 0, 4096), OPT_INTRANGE("gpu-tex-pad-y", tex_pad_y, 0, 0, 4096), OPT_SUBSTRUCT("", icc_opts, mp_icc_conf, 0), - OPT_STRING("gpu-shader-cache-dir", shader_cache_dir, 0), + OPT_STRING("gpu-shader-cache-dir", shader_cache_dir, M_OPT_FILE), OPT_STRING_VALIDATE("gpu-hwdec-interop", hwdec_interop, 0, ra_hwdec_validate_opt), OPT_REPLACED("opengl-hwdec-interop", "gpu-hwdec-interop"), -- cgit v1.2.3