diff options
author | Avi Halachmi (:avih) <avihpit@yahoo.com> | 2020-07-23 15:35:56 +0300 |
---|---|---|
committer | avih <avih@users.noreply.github.com> | 2020-11-16 20:29:58 +0200 |
commit | 799d3d4557e3655f9a373b6a7009790d3fa92e70 (patch) | |
tree | 7a7418e62c1d855e53cf8479622da5884df0e60d /player/playloop.c | |
parent | 26fc70dbfdb11844497f34e2d96ecd6a011cd6bc (diff) | |
download | mpv-799d3d4557e3655f9a373b6a7009790d3fa92e70.tar.bz2 mpv-799d3d4557e3655f9a373b6a7009790d3fa92e70.tar.xz |
command: add internal INPUT_PROCESSED event
Fires after a non-empty input queue was processed.
Currently yet unused, but the next commit will use it.
Diffstat (limited to 'player/playloop.c')
-rw-r--r-- | player/playloop.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/player/playloop.c b/player/playloop.c index 6cff3c9108..87c8b6390c 100644 --- a/player/playloop.c +++ b/player/playloop.c @@ -110,13 +110,17 @@ void mp_core_unlock(struct MPContext *mpctx) // Process any queued user input. static void mp_process_input(struct MPContext *mpctx) { + int processed = 0; for (;;) { mp_cmd_t *cmd = mp_input_read_cmd(mpctx->input); if (!cmd) break; run_command(mpctx, cmd, NULL, NULL, NULL); + processed = 1; } mp_set_timeout(mpctx, mp_input_get_delay(mpctx->input)); + if (processed) + mp_notify(mpctx, MP_EVENT_INPUT_PROCESSED, NULL); } double get_relative_time(struct MPContext *mpctx) |