From d07b7f068db56aa5fa7cf16b9d077721ff0a8452 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 16 Dec 2019 02:32:17 +0100 Subject: command: change "window-scale" property behavior This is similar to the "edition" change. I considered making this go through deprecation, but didn't have a good idea how to do that. Maybe it's fine, because this is pretty obscure. But it might break some API users/scripts (it certainly broke stats.lua), and all I have to say is sorry for that. --- DOCS/interface-changes.rst | 4 ++++ DOCS/man/input.rst | 18 ++++++++++++++---- 2 files changed, 18 insertions(+), 4 deletions(-) (limited to 'DOCS') diff --git a/DOCS/interface-changes.rst b/DOCS/interface-changes.rst index e3f197ab33..f12e6ed54a 100644 --- a/DOCS/interface-changes.rst +++ b/DOCS/interface-changes.rst @@ -67,6 +67,10 @@ Interface changes be queried to read the runtime-chosen edition. This is a breaking change for any users which expected "edition" to return the runtime-chosen edition at default settings (--edition=auto). + - the "window-scale" property now strictly returns the value of the option, + instead of the actual size of the window. The new "current-window-scale" + property needs to be queried to read the value as indicated by the current + window size. This is a breaking change. --- mpv 0.30.0 --- - add `--d3d11-output-format` to enable explicit selection of a D3D11 swap chain format. diff --git a/DOCS/man/input.rst b/DOCS/man/input.rst index fbfede5869..08edf618b1 100644 --- a/DOCS/man/input.rst +++ b/DOCS/man/input.rst @@ -2026,6 +2026,20 @@ Property list (or to be exact, the size the video filters output). ``2`` will set the double size, ``0.5`` halves the size. + See ``current-window-scale`` for the value derived from the actual window + size. + + Since mpv 0.31.0, this always returns the previously set value (or the + default value), instead of the value implied by the actual window size. + Before mpv 0.31.0, this returned what ``current-window-scale`` returns now, + after the window was created. + +``current-window-scale`` + The ``window-scale`` value calculated from the current window size. This + has the same value as ``window-scale`` if the window size was not changed + since setting the option, and the window size was not restricted in other + ways. The property is unavailable if no video is active. + ``display-names`` Names of the displays that the mpv window covers. On X11, these are the xrandr names (LVDS1, HDMI1, DP1, VGA1, etc.). On Windows, these @@ -2731,10 +2745,6 @@ 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`` - Returns the current window values if a window exists, and the option value - otherwise. - ``profile``, ``include`` These are write-only, and will perform actions as they are written to, exactly as if they were used on the mpv CLI commandline. Their only use is -- cgit v1.2.3