diff options
author | wm4 <wm4@nowhere> | 2015-03-04 17:20:47 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-03-04 17:28:42 +0100 |
commit | f447179c598fcd13cd239a56044b483c660f6093 (patch) | |
tree | 288aa793a77ee9d6e7db69eb0ba6a77fd33f70d0 /options/m_option.h | |
parent | 3cd394995f812aba93166febd1032e3f4208d49b (diff) | |
download | mpv-f447179c598fcd13cd239a56044b483c660f6093.tar.bz2 mpv-f447179c598fcd13cd239a56044b483c660f6093.tar.xz |
options: add flag option type
Diffstat (limited to 'options/m_option.h')
-rw-r--r-- | options/m_option.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/options/m_option.h b/options/m_option.h index c26d1b3529..401d98473d 100644 --- a/options/m_option.h +++ b/options/m_option.h @@ -52,6 +52,7 @@ extern const m_option_type_t m_option_type_keyvalue_list; extern const m_option_type_t m_option_type_time; extern const m_option_type_t m_option_type_rel_time; extern const m_option_type_t m_option_type_choice; +extern const m_option_type_t m_option_type_flags; extern const m_option_type_t m_option_type_msglevels; extern const m_option_type_t m_option_type_print_fn; extern const m_option_type_t m_option_type_subconfig; @@ -626,6 +627,9 @@ extern const char m_option_path_separator; #define OPT_CHOICE_(optname, varname, flags, choices, ...) \ OPT_GENERAL(int, optname, varname, flags, M_CHOICES(choices), __VA_ARGS__) +#define OPT_FLAGS(...) \ + OPT_CHOICE_(__VA_ARGS__, .type = &m_option_type_flags) + // Union of choices and an int range. The choice values can be included in the // int range, or be completely separate - both works. #define OPT_CHOICE_OR_INT_(optname, varname, flags, minval, maxval, choices, ...) \ |