diff options
author | wm4 <wm4@nowhere> | 2013-12-01 17:34:43 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-12-01 17:34:43 +0100 |
commit | 071ae5613f4bbbc41f0780505bc30ef3611cad38 (patch) | |
tree | b9c17e8a6a92027b3179f5ad62d0c2d0dacb9987 | |
parent | b5d7c95e361d26b8316e8ab70ea66126fbd861b9 (diff) | |
download | mpv-071ae5613f4bbbc41f0780505bc30ef3611cad38.tar.bz2 mpv-071ae5613f4bbbc41f0780505bc30ef3611cad38.tar.xz |
input: improve some comments
I have the feeling some of these were written before everything was
changed all over again.
-rw-r--r-- | mpvcore/input/input.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mpvcore/input/input.c b/mpvcore/input/input.c index b454d3f574..b93b6521d8 100644 --- a/mpvcore/input/input.c +++ b/mpvcore/input/input.c @@ -1484,7 +1484,7 @@ static void remove_key_down(struct input_ctx *ictx, int code) } } -// Whether a command can deal with redundant key up events. +// Whether a command shall be sent on both key down and key up events. static bool key_updown_ok(enum mp_command_type cmd) { switch (cmd) { @@ -1595,9 +1595,9 @@ static void interpret_key(struct input_ctx *ictx, int code, double scale) if (!cmd) return; - // Prevent redundant key-down events from being added to the queue. In some - // cases (like MP_CMD_SEEK commands), duplicated events might severely - // confuse the frontend. + // Don't emit a command on key-down if the key is designed to emit commands + // on key-up (like mouse buttons). Also, if the command specifically should + // be sent both on key down and key up, still emit the command. if (cmd->key_up_follows && !key_updown_ok(cmd->id)) { talloc_free(cmd); return; |