From 0a78a61d897918c1f013a3d7d308c5a3939c53cc Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 20 Nov 2014 23:41:01 +0100 Subject: input: add a prefix to make any binding act on key repeat The fact that it's a generic command prefix that is parsed even when using the client API is a bit unclean (because this flag makes sense for actual key-bindings only), but it's less code this way. --- input/cmd_list.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'input/cmd_list.c') diff --git a/input/cmd_list.c b/input/cmd_list.c index c1413f7dd9..e0e307b4c4 100644 --- a/input/cmd_list.c +++ b/input/cmd_list.c @@ -297,7 +297,8 @@ bool mp_input_is_abort_cmd(struct mp_cmd *cmd) bool mp_input_is_repeatable_cmd(struct mp_cmd *cmd) { return (cmd->def && cmd->def->allow_auto_repeat) || - cmd->id == MP_CMD_COMMAND_LIST; + cmd->id == MP_CMD_COMMAND_LIST || + (cmd->flags & MP_ALLOW_REPEAT); } void mp_print_cmd_list(struct mp_log *out) -- cgit v1.2.3