summaryrefslogtreecommitdiffstats
path: root/mpvcore/input
diff options
context:
space:
mode:
Diffstat (limited to 'mpvcore/input')
-rw-r--r--mpvcore/input/input.c4
-rw-r--r--mpvcore/input/input.h1
2 files changed, 4 insertions, 1 deletions
diff --git a/mpvcore/input/input.c b/mpvcore/input/input.c
index b26f2d491d..5b74f1aa33 100644
--- a/mpvcore/input/input.c
+++ b/mpvcore/input/input.c
@@ -1877,8 +1877,10 @@ mp_cmd_t *mp_input_get_cmd(struct input_ctx *ictx, int time, int peek_only)
struct cmd_queue *queue = &ictx->cmd_queue;
if (!queue->first) {
struct mp_cmd *repeated = check_autorepeat(ictx);
- if (repeated)
+ if (repeated) {
+ repeated->repeated = true;
queue_add_tail(queue, repeated);
+ }
}
struct mp_cmd *ret = queue_peek(queue);
if (ret && !peek_only) {
diff --git a/mpvcore/input/input.h b/mpvcore/input/input.h
index dc308ff9f6..3e8da7eb75 100644
--- a/mpvcore/input/input.h
+++ b/mpvcore/input/input.h
@@ -154,6 +154,7 @@ typedef struct mp_cmd {
bstr original;
char *input_section;
bool key_up_follows;
+ bool repeated;
bool mouse_move;
int mouse_x, mouse_y;
struct mp_cmd *queue_next;