diff options
author | wm4 <wm4@nowhere> | 2013-12-26 19:22:40 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-12-26 19:25:51 +0100 |
commit | dacb6ad98fb70da8e115549f3b045f00aff4034d (patch) | |
tree | ab2b897c41a571e79e6b9bed1e677f9a0c769dcd /input | |
parent | 4ea8612b406b84c2c8f3f7a001b829132caf3468 (diff) | |
download | mpv-dacb6ad98fb70da8e115549f3b045f00aff4034d.tar.bz2 mpv-dacb6ad98fb70da8e115549f3b045f00aff4034d.tar.xz |
options: simplify handling of some help options
Diffstat (limited to 'input')
-rw-r--r-- | input/input.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/input/input.c b/input/input.c index d08ea5b6f3..94ee64cd4f 100644 --- a/input/input.c +++ b/input/input.c @@ -184,20 +184,6 @@ int async_quit_request; static int parse_config(struct input_ctx *ictx, bool builtin, bstr data, const char *location, const char *restrict_section); -static int print_key_list(struct mp_log *log, m_option_t *cfg, - char *optname, char *optparam) -{ - mp_print_key_list(log); - return M_OPT_EXIT; -} - -static int print_cmd_list(struct mp_log *log, m_option_t *cfg, - char *optname, char *optparam) -{ - mp_print_cmd_list(log); - return M_OPT_EXIT; -} - #define OPT_BASE_STRUCT struct MPOpts // Our command line options @@ -205,8 +191,8 @@ static const m_option_t input_config[] = { OPT_STRING("conf", input.config_file, CONF_GLOBAL), OPT_INT("ar-delay", input.ar_delay, CONF_GLOBAL), OPT_INT("ar-rate", input.ar_rate, CONF_GLOBAL), - { "keylist", print_key_list, CONF_TYPE_PRINT_FUNC, CONF_GLOBAL | CONF_NOCFG }, - { "cmdlist", print_cmd_list, CONF_TYPE_PRINT_FUNC, CONF_GLOBAL | CONF_NOCFG }, + OPT_PRINT("keylist", mp_print_key_list), + OPT_PRINT("cmdlist", mp_print_cmd_list), OPT_STRING("js-dev", input.js_dev, CONF_GLOBAL), OPT_STRING("file", input.in_file, CONF_GLOBAL), OPT_FLAG("default-bindings", input.default_bindings, CONF_GLOBAL), |