summaryrefslogtreecommitdiffstats
path: root/options/options.c
diff options
context:
space:
mode:
authorAvi Halachmi (:avih) <avihpit@yahoo.com>2021-04-17 13:18:43 +0300
committerAvi Halachmi (:avih) <avihpit@yahoo.com>2021-04-23 10:45:51 +0300
commitef1d0b2cdb43121f0138dfb39f516aee9d7314ad (patch)
tree359fb39fe5ee5e5445f13b0fc091b5f1ebc134b1 /options/options.c
parentf665149fc889724ab011b6839f17568b1e9c69d0 (diff)
downloadmpv-ef1d0b2cdb43121f0138dfb39f516aee9d7314ad.tar.bz2
mpv-ef1d0b2cdb43121f0138dfb39f516aee9d7314ad.tar.xz
options: win32: ignore and deprecate --fit-border
The accurate description of this option was: - fit-border is enabled by default. When disabled, it adds a bug where if the window has borders and mpv shrinks it to fit the desktop, then the calculation ignores the borders and adds incorrect video crop. The option was added at commits 70f64f3c and 949247d6, in order to solve an issue (#2935) where if mpv wanted to display a video with size WxH, then w32_common.c incorrectly set the window to WxH, while down-scaling the video slightly to fit (even with small sizes). It was addressed with a new option which is enabled by default, but does the right thing (sets the client area to WxH) only when disabled, so that everyone who prefers their video slightly downscaled could keep their default behavior. (#2935 also addressed an off-by-one issue, fixed before fit-border) While disabling the option did avoid unnecessary downscaling, it also added a bug when disabled: the borders are no longer taken into account when the size is too big for the desktop. Most users don't notice and are unaffected as it's enabled by default. Shortly later (981048e0) the core issue is fixed, and now the client area is correctly set to WxH instead of the window (and together with the three following commits which center the video, adds a new bug where the window title can be outside the display - addressed next). However, fit-border remained, now without any effect, except that it still has the same bug when disabled and the window is too big. Later code changes and refactoring preserved this issue with great attention to details, and it remained in identical form until now. Simply rip out fit-border.
Diffstat (limited to 'options/options.c')
-rw-r--r--options/options.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/options/options.c b/options/options.c
index 2a168da4e5..45ba410fc9 100644
--- a/options/options.c
+++ b/options/options.c
@@ -113,7 +113,8 @@ static const m_option_t mp_vo_opt_list[] = {
{"ontop-level", OPT_CHOICE(ontop_level, {"window", -1}, {"system", -2},
{"desktop", -3}), M_RANGE(0, INT_MAX)},
{"border", OPT_FLAG(border)},
- {"fit-border", OPT_FLAG(fit_border)},
+ {"fit-border", OPT_FLAG(fit_border),
+ .deprecation_message = "the option is ignored and no longer needed"},
{"on-all-workspaces", OPT_FLAG(all_workspaces)},
{"geometry", OPT_GEOMETRY(geometry)},
{"autofit", OPT_SIZE_BOX(autofit)},