command: osd-dimensions: return ints and doc fixes

Some subproperties in osd-dimensions were returned as doubles despite
actually being integers. Additionally, correct a highly misleading line
in the osd-width/osd-height documentation.
This commit is contained in:
Dudemanguy 2021-04-29 08:53:58 -05:00
parent 96b68358e3
commit 029cd8a813
2 changed files with 8 additions and 8 deletions

View File

@ -2544,8 +2544,8 @@ Property list
``osd-width``, ``osd-height``
Last known OSD width (can be 0). This is needed if you want to use the
``overlay-add`` command. It gives you the actual OSD size, which can be
different from the window size in some cases.
``overlay-add`` command. It gives you the actual OSD/window size (not
including decorations drawn by the OS window manager).
Alias to ``osd-dimensions/w`` and ``osd-dimensions/h``.

View File

@ -2587,14 +2587,14 @@ static int mp_property_osd_dim(void *ctx, struct m_property *prop,
(vo_res.display_par ? vo_res.display_par : 1);
struct m_sub_property props[] = {
{"w", SUB_PROP_DOUBLE(vo_res.w)},
{"h", SUB_PROP_DOUBLE(vo_res.h)},
{"w", SUB_PROP_INT(vo_res.w)},
{"h", SUB_PROP_INT(vo_res.h)},
{"par", SUB_PROP_DOUBLE(vo_res.display_par)},
{"aspect", SUB_PROP_DOUBLE(aspect)},
{"mt", SUB_PROP_DOUBLE(vo_res.mt)},
{"mb", SUB_PROP_DOUBLE(vo_res.mb)},
{"ml", SUB_PROP_DOUBLE(vo_res.ml)},
{"mr", SUB_PROP_DOUBLE(vo_res.mr)},
{"mt", SUB_PROP_INT(vo_res.mt)},
{"mb", SUB_PROP_INT(vo_res.mb)},
{"ml", SUB_PROP_INT(vo_res.ml)},
{"mr", SUB_PROP_INT(vo_res.mr)},
{0}
};