1
0
mirror of https://github.com/mpv-player/mpv synced 2025-03-22 03:08:33 +00:00

input: move a function

This commit is contained in:
wm4 2014-04-18 16:48:13 +02:00
parent ecb4c08ee2
commit b87191d176

View File

@ -348,17 +348,6 @@ static mp_cmd_t *handle_test(struct input_ctx *ictx, int code)
return res;
}
static bool bind_matches_key(struct cmd_bind *bind, int num_keys, const int *keys)
{
if (bind->num_keys != num_keys)
return false;
for (int i = 0; i < num_keys; i++) {
if (bind->keys[i] != keys[i])
return false;
}
return true;
}
static struct cmd_bind_section *get_bind_section(struct input_ctx *ictx,
bstr section)
{
@ -1323,6 +1312,17 @@ void mp_input_define_section(struct input_ctx *ictx, char *name, char *location,
input_unlock(ictx);
}
static bool bind_matches_key(struct cmd_bind *bind, int num_keys, const int *keys)
{
if (bind->num_keys != num_keys)
return false;
for (int i = 0; i < num_keys; i++) {
if (bind->keys[i] != keys[i])
return false;
}
return true;
}
static void bind_keys(struct input_ctx *ictx, bool builtin, bstr section,
const int *keys, int num_keys, bstr command,
const char *loc)