From d6c99bcda2b4e2791c6b147f5ba9d9cd95c7be7f Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 6 Aug 2015 00:31:47 +0200 Subject: lua: implement input_enable_section/input_disable_section via commands Removes some more internal API calls from the Lua scripting backend. Which is good, because ideally the scripting backend would use libmpv functions only. One awkwardness is that mouse sections are still not supported by the public commands (and probably will never), so flags like allow-hide- cursor make no sense to an outside user. Also, the way flags are passed to the Lua function changes. But that's ok, because they're only undocumented internal functions, and not supposed to be used by script users. osc.lua only does due to historical reasons. --- player/command.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'player/command.c') diff --git a/player/command.c b/player/command.c index edb1d81d66..742e78ef9e 100644 --- a/player/command.c +++ b/player/command.c @@ -4684,8 +4684,7 @@ int run_command(struct MPContext *mpctx, struct mp_cmd *cmd, struct mpv_node *re } case MP_CMD_ENABLE_INPUT_SECTION: - mp_input_enable_section(mpctx->input, cmd->args[0].v.s, - cmd->args[1].v.i == 1 ? MP_INPUT_EXCLUSIVE : 0); + mp_input_enable_section(mpctx->input, cmd->args[0].v.s, cmd->args[1].v.i); break; case MP_CMD_DISABLE_INPUT_SECTION: -- cgit v1.2.3