diff options
author | Uoti Urpala <uau@mplayer2.org> | 2011-09-04 14:34:45 +0300 |
---|---|---|
committer | Uoti Urpala <uau@mplayer2.org> | 2011-09-04 14:36:09 +0300 |
commit | 89b37a32dabc456f35a8e3d828a22861bd292ca8 (patch) | |
tree | 607fbba9d6fd42d6700a5bab5282d2ea1fdef17a /cfg-mplayer.h | |
parent | 79469244f72d4350b630b21eac034a81b7b24cba (diff) | |
download | mpv-89b37a32dabc456f35a8e3d828a22861bd292ca8.tar.bz2 mpv-89b37a32dabc456f35a8e3d828a22861bd292ca8.tar.xz |
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.
Diffstat (limited to 'cfg-mplayer.h')
-rw-r--r-- | cfg-mplayer.h | 4 |
1 files changed, 2 insertions, 2 deletions
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}, |