diff options
author | nanahi <130121847+na-na-hi@users.noreply.github.com> | 2024-02-26 18:19:16 -0500 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2024-03-01 18:25:12 +0100 |
commit | 9d03b83a6c26341b2dd7c5e1ffc4592219c79730 (patch) | |
tree | 5e3d152d4b99d9aed926eaedc694db904e336287 /player | |
parent | 4560d93bf0f2494f4f1344ac1840801911be7319 (diff) | |
download | mpv-9d03b83a6c26341b2dd7c5e1ffc4592219c79730.tar.bz2 mpv-9d03b83a6c26341b2dd7c5e1ffc4592219c79730.tar.xz |
command: add begin-vo-dragging command
This command initializes a vo dragging request for VOs that implement
the new VOCTRL_BEGIN_DRAGGING voctrl. This allows scripts to begin vo
dragging for any button press event.
Diffstat (limited to 'player')
-rw-r--r-- | player/command.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/player/command.c b/player/command.c index 2690fd4a27..e1de32be25 100644 --- a/player/command.c +++ b/player/command.c @@ -6502,6 +6502,16 @@ static void cmd_dump_cache_ab(void *p) cmd->args[0].v.s); } +static void cmd_begin_vo_dragging(void *p) +{ + struct mp_cmd_ctx *cmd = p; + struct MPContext *mpctx = cmd->mpctx; + struct vo *vo = mpctx->video_out; + + if (vo) + vo_control(vo, VOCTRL_BEGIN_DRAGGING, NULL); +} + /* This array defines all known commands. * The first field the command name used in libmpv and input.conf. * The second field is the handler function (see mp_cmd_def.handler and @@ -6970,6 +6980,8 @@ const struct mp_cmd_def mp_cmds[] = { { "ab-loop-align-cache", cmd_align_cache_ab }, + { "begin-vo-dragging", cmd_begin_vo_dragging }, + {0} }; |