diff --git a/DOCS/man/input.rst b/DOCS/man/input.rst index e626b1ba81..17bba1c2ab 100644 --- a/DOCS/man/input.rst +++ b/DOCS/man/input.rst @@ -2122,6 +2122,9 @@ caveats with some properties (due to historical reasons): option is for loading playlist during command line parsing. For client API uses, you should use the ``loadlist`` command instead. +``window-scale`` + Might verify the set value when setting while a window is created. + ``audio-file``, ``sub-file``, ``external-file`` These options/properties are actually lists of filenames. To make the command-line interface easier, each ``--audio-file=...`` option appends diff --git a/player/command.c b/player/command.c index 877e0e7e5a..6c5b3e947d 100644 --- a/player/command.c +++ b/player/command.c @@ -2693,7 +2693,10 @@ static int mp_property_window_scale(void *ctx, struct m_property *prop, int s[2] = {vid_w * scale, vid_h * scale}; if (s[0] > 0 && s[1] > 0 && vo_control(vo, VOCTRL_SET_UNFS_WINDOW_SIZE, s) > 0) + { + mpctx->opts->vo->window_scale = scale; return M_PROPERTY_OK; + } return M_PROPERTY_UNAVAILABLE; } case M_PROPERTY_GET: { @@ -2707,13 +2710,7 @@ static int mp_property_window_scale(void *ctx, struct m_property *prop, return M_PROPERTY_OK; } case M_PROPERTY_GET_TYPE: - *(struct m_option *)arg = (struct m_option){ - .type = CONF_TYPE_DOUBLE, - .flags = CONF_RANGE, - .min = 0.125, - .max = 8, - }; - return M_PROPERTY_OK; + return mp_property_generic_option(mpctx, prop, action, arg); } return M_PROPERTY_NOT_IMPLEMENTED; }