mirror of
https://github.com/mpv-player/mpv
synced 2024-11-03 03:19:24 +01:00
commands: remove third parameter for "switch"
This could change the direction (i.e. invoke STEP_PROPERTY_DOWN), but you can just pass a negative value as second argument instead.
This commit is contained in:
parent
a749c61437
commit
a59eee4893
@ -2167,10 +2167,7 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd)
|
||||
"Ignoring step size stepping property '%s'.\n",
|
||||
cmd->args[0].v.s);
|
||||
}
|
||||
r = mp_property_do(cmd->args[0].v.s,
|
||||
cmd->args[2].v.i < 0 ?
|
||||
M_PROPERTY_STEP_DOWN : M_PROPERTY_STEP_UP,
|
||||
arg, mpctx);
|
||||
r = mp_property_do(cmd->args[0].v.s, M_PROPERTY_STEP_UP, arg, mpctx);
|
||||
step_prop_err:
|
||||
if (r == M_PROPERTY_UNKNOWN)
|
||||
mp_msg(MSGT_CPLAYER, MSGL_WARN,
|
||||
|
@ -136,7 +136,7 @@ static const mp_cmd_t mp_cmds[] = {
|
||||
{ MP_CMD_KEYDOWN_EVENTS, "key_down_event", { ARG_INT } },
|
||||
{ MP_CMD_SET, "set", { ARG_STRING, ARG_STRING } },
|
||||
{ MP_CMD_GET_PROPERTY, "get_property", { ARG_STRING } },
|
||||
{ MP_CMD_SWITCH, "switch", { ARG_STRING, OARG_FLOAT(0), OARG_INT(0) } },
|
||||
{ MP_CMD_SWITCH, "switch", { ARG_STRING, OARG_FLOAT(0) } },
|
||||
|
||||
{ MP_CMD_SET_MOUSE_POS, "set_mouse_pos", { ARG_INT, ARG_INT } },
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user