summaryrefslogtreecommitdiffstats
path: root/input/input.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2018-04-30 20:33:05 +0200
committerJan Ekström <jeebjp@gmail.com>2018-05-03 01:20:01 +0300
commite8b073584d749bb864f495d9e1cd31b102c6283d (patch)
treefae1a577fadb7141c7035d9869c1842ec57b1a15 /input/input.c
parent14602b0201dfdbfd10c239fd978df5c269a71883 (diff)
downloadmpv-e8b073584d749bb864f495d9e1cd31b102c6283d.tar.bz2
mpv-e8b073584d749bb864f495d9e1cd31b102c6283d.tar.xz
input: remove some explicit uses of command IDs
The plan is to remove the command ID enum. This will happen by replacing the big switch statement in command.c with dispatching to per-command callbacks. As preparation, remove uses of the command IDs outside of the actual dispatching mechanism. Also remove some instances of checking cmd->def for NULL. We now require this always to be set.
Diffstat (limited to 'input/input.c')
-rw-r--r--input/input.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/input/input.c b/input/input.c
index 616ce3450c..03771dc2bb 100644
--- a/input/input.c
+++ b/input/input.c
@@ -547,7 +547,7 @@ static struct mp_cmd *resolve_key(struct input_ctx *ictx, int code)
update_mouse_section(ictx);
struct mp_cmd *cmd = get_cmd_from_keys(ictx, NULL, code);
key_buf_add(ictx->key_history, code);
- if (cmd && cmd->id != MP_CMD_IGNORE && !should_drop_cmd(ictx, cmd))
+ if (cmd && !cmd->def->is_ignore && !should_drop_cmd(ictx, cmd))
return cmd;
talloc_free(cmd);
return NULL;