diff options
author | Martin Herkt <lachs0r@srsfckn.biz> | 2017-02-12 01:01:56 +0100 |
---|---|---|
committer | Martin Herkt <lachs0r@srsfckn.biz> | 2017-02-12 01:01:56 +0100 |
commit | 35aa705c3ece8293652ffcf449c71fe80b96e722 (patch) | |
tree | 7c0fb34ec96204cbcd867a973b2476689919a5b4 /input/input.c | |
parent | 10a005df0c981050afc35184a42173bea7ea2527 (diff) | |
parent | 3739d1318fdb658bb6037bfe06bb6cefb3b50a09 (diff) | |
download | mpv-35aa705c3ece8293652ffcf449c71fe80b96e722.tar.bz2 mpv-35aa705c3ece8293652ffcf449c71fe80b96e722.tar.xz |
Merge branch 'master' into release/current
Diffstat (limited to 'input/input.c')
-rw-r--r-- | input/input.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/input/input.c b/input/input.c index 9525dbcbb1..f0f9f64e9b 100644 --- a/input/input.c +++ b/input/input.c @@ -144,7 +144,8 @@ struct input_ctx { struct cmd_queue cmd_queue; - struct mp_cancel *cancel; + void (*cancel)(void *cancel_ctx); + void *cancel_ctx; void (*wakeup_cb)(void *ctx); void *wakeup_ctx; @@ -809,7 +810,7 @@ int mp_input_queue_cmd(struct input_ctx *ictx, mp_cmd_t *cmd) input_lock(ictx); if (cmd) { if (ictx->cancel && test_abort_cmd(ictx, cmd)) - mp_cancel_trigger(ictx->cancel); + ictx->cancel(ictx->cancel_ctx); queue_add_tail(&ictx->cmd_queue, cmd); mp_input_wakeup(ictx); } @@ -1335,10 +1336,11 @@ void mp_input_uninit(struct input_ctx *ictx) talloc_free(ictx); } -void mp_input_set_cancel(struct input_ctx *ictx, struct mp_cancel *cancel) +void mp_input_set_cancel(struct input_ctx *ictx, void (*cb)(void *c), void *c) { input_lock(ictx); - ictx->cancel = cancel; + ictx->cancel = cb; + ictx->cancel_ctx = c; input_unlock(ictx); } |