diff options
author | wm4 <wm4@nowhere> | 2014-11-20 23:41:01 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-11-20 23:41:01 +0100 |
commit | 0a78a61d897918c1f013a3d7d308c5a3939c53cc (patch) | |
tree | fc84b79ed3160015ffddc1976637027b103bcadd /input/cmd_list.c | |
parent | a1811211a29fff3e23f329d735ec72e3ae6dc6a5 (diff) | |
download | mpv-0a78a61d897918c1f013a3d7d308c5a3939c53cc.tar.bz2 mpv-0a78a61d897918c1f013a3d7d308c5a3939c53cc.tar.xz |
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.
Diffstat (limited to 'input/cmd_list.c')
-rw-r--r-- | input/cmd_list.c | 3 |
1 files changed, 2 insertions, 1 deletions
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) |