input: adjust wait time for key-repeat

Basically, these are additional timers that can expire without making
the central select() exit.
This commit is contained in:
wm4 2013-04-24 17:02:52 +02:00
parent 040f95d0f1
commit 003a930285
1 changed files with 4 additions and 0 deletions

View File

@ -1367,6 +1367,10 @@ static void read_key_fd(struct input_ctx *ictx, struct input_fd *key_fd)
*/
static void read_events(struct input_ctx *ictx, int time)
{
if (ictx->num_key_down) {
time = FFMIN(time, 1000 / ictx->ar_rate);
time = FFMIN(time, ictx->ar_delay);
}
ictx->got_new_events = false;
struct input_fd *key_fds = ictx->key_fds;
struct input_fd *cmd_fds = ictx->cmd_fds;