summaryrefslogtreecommitdiffstats
path: root/options/m_option.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-08-31 18:10:11 +0200
committerwm4 <wm4@nowhere>2016-08-31 22:17:21 +0200
commitc55d85992078e465f9e0b7b6998ccdc5f5e77703 (patch)
treedb6a4939daa1c3c0b810710b5d268592a8c29262 /options/m_option.h
parent2057209057555dc138422daa354fe8db816c629c (diff)
downloadmpv-c55d85992078e465f9e0b7b6998ccdc5f5e77703.tar.bz2
mpv-c55d85992078e465f9e0b7b6998ccdc5f5e77703.tar.xz
m_option: replace --no-video-aspect alias
Instead, add a hacky OPT_ASPECT option type, which only exists to accept a "no" parameter, which in combination with the "--no-..." handling code makes --no-video-aspect work again. We can also remove the code in m_config.c, which only existed to make "--no-aspect" (a deprecated alias) to work.
Diffstat (limited to 'options/m_option.h')
-rw-r--r--options/m_option.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/options/m_option.h b/options/m_option.h
index c5385e4241..17c2d4e451 100644
--- a/options/m_option.h
+++ b/options/m_option.h
@@ -38,7 +38,6 @@ struct mpv_node;
// Simple types
extern const m_option_type_t m_option_type_flag;
extern const m_option_type_t m_option_type_store;
-extern const m_option_type_t m_option_type_float_store;
extern const m_option_type_t m_option_type_int;
extern const m_option_type_t m_option_type_int64;
extern const m_option_type_t m_option_type_intpair;
@@ -62,6 +61,7 @@ extern const m_option_type_t m_option_type_color;
extern const m_option_type_t m_option_type_geometry;
extern const m_option_type_t m_option_type_size_box;
extern const m_option_type_t m_option_type_channels;
+extern const m_option_type_t m_option_type_aspect;
extern const m_option_type_t m_option_type_node;
// Used internally by m_config.c
@@ -207,7 +207,6 @@ struct m_sub_options {
union m_option_value {
int flag; // not the C type "bool"!
int store;
- float float_store;
int int_;
int64_t int64;
int intpair[2];
@@ -562,10 +561,6 @@ extern const char m_option_path_separator;
OPT_GENERAL(int, optname, varname, flags, .max = value, \
.type = &m_option_type_store)
-#define OPT_FLOAT_STORE(optname, varname, flags, value) \
- OPT_GENERAL(float, optname, varname, flags, .max = value, \
- .type = &m_option_type_float_store)
-
#define OPT_STRINGLIST(...) \
OPT_GENERAL(char**, __VA_ARGS__, .type = &m_option_type_string_list)
@@ -667,6 +662,9 @@ extern const char m_option_path_separator;
#define OPT_TRACKCHOICE(name, var) \
OPT_CHOICE_OR_INT(name, var, 0, 0, 8190, ({"no", -2}, {"auto", -1}))
+#define OPT_ASPECT(...) \
+ OPT_GENERAL(float, __VA_ARGS__, .type = &m_option_type_aspect)
+
#define OPT_STRING_VALIDATE_(optname, varname, flags, validate_fn, ...) \
OPT_GENERAL(char*, optname, varname, flags, __VA_ARGS__, \
.priv = MP_EXPECT_TYPE(m_opt_string_validate_fn, validate_fn))