diff options
Diffstat (limited to 'input/input.c')
-rw-r--r-- | input/input.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/input/input.c b/input/input.c index 5415b369d7..aec78a7c0e 100644 --- a/input/input.c +++ b/input/input.c @@ -607,6 +607,7 @@ static void interpret_key(struct input_ctx *ictx, int code, double scale) ictx->ar_state = 0; ictx->current_down_cmd = mp_cmd_clone(cmd); ictx->current_down_cmd_need_release = false; + mp_input_wakeup(ictx); // possibly start timer for autorepeat } else if (state == MP_KEY_STATE_UP) { // Most VOs send RELEASE_ALL anyway release_down_cmd(ictx, false); @@ -792,8 +793,8 @@ unsigned int mp_input_get_mouse_event_counter(struct input_ctx *ictx) static void adjust_max_wait_time(struct input_ctx *ictx, double *time) { if (ictx->last_key_down && ictx->ar_rate > 0 && ictx->ar_state >= 0) { - *time = FFMIN(*time, 1000 / ictx->ar_rate); - *time = FFMIN(*time, ictx->ar_delay); + *time = FFMIN(*time, 1.0 / ictx->ar_rate); + *time = FFMIN(*time, ictx->ar_delay / 1000.0); } } |