0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 03:52:22 +02:00
mpv/options
wm4 26f4f18c06 options: change option macros and all option declarations
Change all OPT_* macros such that they don't define the entire m_option
initializer, and instead expand only to a part of it, which sets certain
fields. This requires changing almost every option declaration, because
they all use these macros. A declaration now always starts with

   {"name", ...

followed by designated initializers only (possibly wrapped in macros).
The OPT_* macros now initialize the .offset and .type fields only,
sometimes also .priv and others.

I think this change makes the option macros less tricky. The old code
had to stuff everything into macro arguments (and attempted to allow
setting arbitrary fields by letting the user pass designated
initializers in the vararg parts). Some of this was made messy due to
C99 and C11 not allowing 0-sized varargs with ',' removal. It's also
possible that this change is pointless, other than cosmetic preferences.

Not too happy about some things. For example, the OPT_CHOICE()
indentation I applied looks a bit ugly.

Much of this change was done with regex search&replace, but some places
required manual editing. In particular, code in "obscure" areas (which I
didn't include in compilation) might be broken now.

In wayland_common.c the author of some option declarations confused the
flags parameter with the default value (though the default value was
also properly set below). I fixed this with this change.
2020-03-18 19:52:01 +01:00
..
m_config_core.c options: more pushing code around 2020-03-13 16:50:27 +01:00
m_config_core.h options: more pushing code around 2020-03-13 16:50:27 +01:00
m_config_frontend.c options: change how option range min/max is handled 2020-03-13 17:34:46 +01:00
m_config_frontend.h options: more pushing code around 2020-03-13 16:50:27 +01:00
m_config.h options: split m_config.c/h 2020-03-13 16:50:27 +01:00
m_option.c m_option: remove debug code 2020-03-14 19:08:47 +01:00
m_option.h options: change option macros and all option declarations 2020-03-18 19:52:01 +01:00
m_property.c command: disable edition switching if there are no editions 2020-03-14 01:32:27 +01:00
m_property.h command: move property multiply code to m_property.c 2018-03-26 19:47:08 +02:00
options.c options: change option macros and all option declarations 2020-03-18 19:52:01 +01:00
options.h options: introduce bool option type, use it for --fullscreen 2020-03-14 02:23:38 +01:00
parse_commandline.c options: split m_config.c/h 2020-03-13 16:50:27 +01:00
parse_commandline.h player: get rid of mpv_global.opts 2018-05-24 19:56:35 +02:00
parse_configfile.c options: change license of most files to LGPL (except options.c/.h) 2017-06-12 20:55:17 +02:00
parse_configfile.h options: split m_config.c/h 2020-03-13 16:50:27 +01:00
path.c path: add mp_path_is_absolute() 2020-02-06 14:14:35 +01:00
path.h path: add mp_path_is_absolute() 2020-02-06 14:14:35 +01:00