mirror of
https://github.com/mpv-player/mpv
synced 2025-03-11 08:37:59 +00:00
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:
parent
040f95d0f1
commit
003a930285
@ -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)
|
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;
|
ictx->got_new_events = false;
|
||||||
struct input_fd *key_fds = ictx->key_fds;
|
struct input_fd *key_fds = ictx->key_fds;
|
||||||
struct input_fd *cmd_fds = ictx->cmd_fds;
|
struct input_fd *cmd_fds = ictx->cmd_fds;
|
||||||
|
Loading…
Reference in New Issue
Block a user