summaryrefslogtreecommitdiffstats
path: root/DOCS
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2020-11-07 18:36:26 -0600
committerDudemanguy <random342@airmail.cc>2021-08-05 19:13:10 +0000
commit873ae0de2af3bb84a11e5e57f6e3a8942b2263c2 (patch)
tree566387964502e2ce0a4e649717476997a6f3ee87 /DOCS
parent41650203c32e179e5f3cf89e176ef6caccba05d9 (diff)
downloadmpv-873ae0de2af3bb84a11e5e57f6e3a8942b2263c2.tar.bz2
mpv-873ae0de2af3bb84a11e5e57f6e3a8942b2263c2.tar.xz
command: make current-window-scale writeable
Somewhat confusingly, mpv has both a window-scale option and a current-window-scale property. The documentation lists window-scale under properties (and it is technically is one), but at its core it is actually an option which means it behaves subtly different. Options in mpv are runtime-configurable, but they only change anything if the value of the option itself changes. window-scale is an option and not meant to keep track of the actual scale of the window (intended behavior introduced by d07b7f0). This causes window-scale to do nothing in certain cases (ex: the window is manually resized and window-scale is set to 1.00 again). This is logical and consistent with the behavior of the rest of the mpv options, but it also makes it a poor candidate for setting the mpv window scale dynamically. As a remedy, we can just make current-window-scale writeable instead. current-window-scale is intended to always report the actual scale of the window and keep track of any window size changes made by the user. By making this property also writeable, it allows the user to have more intuitive behavior (i.e. setting current-window-scale to 1.00 always sets the window to a scale of 1). Additionally, the default input.conf is changed to use current-window-scale instead of window-scale. The window-scale documentation under property list is removed since it is already documented under options and users should probably set the current-window-scale property instead in most cases.
Diffstat (limited to 'DOCS')
-rw-r--r--DOCS/interface-changes.rst1
-rw-r--r--DOCS/man/input.rst22
2 files changed, 9 insertions, 14 deletions
diff --git a/DOCS/interface-changes.rst b/DOCS/interface-changes.rst
index b4927470fa..ee84bc8f1c 100644
--- a/DOCS/interface-changes.rst
+++ b/DOCS/interface-changes.rst
@@ -42,6 +42,7 @@ Interface changes
instead be used to specifically set the contrast to any value.
- add a `--watch-later-options` option to allow configuring which
options quit-watch-later saves
+ - make `current-window-scale` writeable and use it in the default input.conf
--- mpv 0.33.0 ---
- add `--d3d11-exclusive-fs` flag to enable D3D11 exclusive fullscreen mode
when the player enters fullscreen.
diff --git a/DOCS/man/input.rst b/DOCS/man/input.rst
index 75841dba99..26735bf819 100644
--- a/DOCS/man/input.rst
+++ b/DOCS/man/input.rst
@@ -2518,26 +2518,20 @@ Property list
enabled, or after precise seeking). Files with imprecise timestamps (such
as Matroska) might lead to unstable results.
-``window-scale`` (RW)
+``current-window-scale`` (RW)
Window size multiplier. Setting this will resize the video window to the
values contained in ``dwidth`` and ``dheight`` multiplied with the value
set with this property. Setting ``1`` will resize to original video size
(or to be exact, the size the video filters output). ``2`` will set the
- double size, ``0.5`` halves the size.
+ double size, ``0.5`` halves the size. When reading this property, this
+ returns the scale value calculated from the current window 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.
+ The similarly named ``window-scale`` option behaves like a typical mpv
+ option. It does not pay attention to realtime window changes and only
+ updates if the user changes its value. In most cases, you probably want
+ to set ``current-window-scale`` directly.
-``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.
+ ``current-window-scale`` is unavailable if no video is active.
``focused``
Whether the window has focus. Might not be supported by all VOs.