From 89b37a32dabc456f35a8e3d828a22861bd292ca8 Mon Sep 17 00:00:00 2001 From: Uoti Urpala Date: Sun, 4 Sep 2011 14:34:45 +0300 Subject: options: add "disabled option" functionality Add functionality to mark options that depend on features disabled at compile time as disabled rather than not compiling the option definitions at all. This allows printing a warning about the option not being available because of a disabled feature, instead of just "unknown option". Because the option definitions are still compiled fully, this only works for definitions that do not reference symbols which are not available if the feature is disabled. Use the new functionality for options depending on libass. --- cfg-mplayer.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cfg-mplayer.h') diff --git a/cfg-mplayer.h b/cfg-mplayer.h index fc87ed88d8..48890eab26 100644 --- a/cfg-mplayer.h +++ b/cfg-mplayer.h @@ -691,7 +691,7 @@ const m_option_t common_opts[] = { {"subfont-outline", &subtitle_font_thickness, CONF_TYPE_FLOAT, CONF_RANGE, 0, 8, NULL}, {"subfont-autoscale", &subtitle_autoscale, CONF_TYPE_INT, CONF_RANGE, 0, 3, NULL}, #endif -#ifdef CONFIG_ASS + OPT_START_CONDITIONAL(CONFIG_ASS, "libass"), OPT_MAKE_FLAGS("ass", ass_enabled, 0), OPT_FLOATRANGE("ass-font-scale", ass_font_scale, 0, 0, 100), OPT_FLOATRANGE("ass-line-spacing", ass_line_spacing, 0, -1000, 1000), @@ -705,7 +705,7 @@ const m_option_t common_opts[] = { OPT_STRING("ass-border-color", ass_border_color, 0), OPT_STRING("ass-styles", ass_styles_file, 0), OPT_INTRANGE("ass-hinting", ass_hinting, 0, 0, 7), -#endif + OPT_START_CONDITIONAL(1, ""), #ifdef CONFIG_FONTCONFIG {"fontconfig", &font_fontconfig, CONF_TYPE_FLAG, 0, -1, 1, NULL}, {"nofontconfig", &font_fontconfig, CONF_TYPE_FLAG, 0, 1, -1, NULL}, -- cgit v1.2.3