summaryrefslogtreecommitdiffstats
path: root/mpvcore/input/input.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-10-28 00:33:52 +0100
committerwm4 <wm4@nowhere>2013-10-28 00:33:52 +0100
commit5e9c226229087cb6b594795e1c83dc6efb105a31 (patch)
tree705e0658a68e10f1decc916b78adb43e0c8318de /mpvcore/input/input.c
parentf2d438a1fd395fff0304594c35d46a3891d0ad65 (diff)
downloadmpv-5e9c226229087cb6b594795e1c83dc6efb105a31.tar.bz2
mpv-5e9c226229087cb6b594795e1c83dc6efb105a31.tar.xz
command: disable autorepeat for some commands (actually properties)
Disable autorepeat for the "add"/"cycle" commands when changing properties that are choices (such as fullscreen, pause, and more). In these cases, autorepeat is not very useful, and can rather harmful effects (like triggering too many repeated commands if command execution is slow). (Actually, the commands are just dropped _after_ being repeated, since input.c itself does not know enough about the commands to decide whether or not they should be repeated.)
Diffstat (limited to 'mpvcore/input/input.c')
-rw-r--r--mpvcore/input/input.c4
1 files changed, 3 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) {