From e69a5559e892d821d8aad75c037f38e68b0fb3db Mon Sep 17 00:00:00 2001 From: stax76 Date: Sun, 19 Jun 2022 07:51:30 +0200 Subject: [PATCH] Fix start-size=session not working --- docs/Changelog.md | 1 + src/WinForms/MainForm.cs | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/Changelog.md b/docs/Changelog.md index 00ae62b..f85099e 100644 --- a/docs/Changelog.md +++ b/docs/Changelog.md @@ -9,6 +9,7 @@ - Fix long commands causing key bindings not visible in the command palette. - Fix script compatibility with mordenx and mpv-osc-tethys. - Fix borderless window not resizable with mouse. +- Fix start-size=session not working. input.conf changes: diff --git a/src/WinForms/MainForm.cs b/src/WinForms/MainForm.cs index c2eb8aa..70c72b6 100644 --- a/src/WinForms/MainForm.cs +++ b/src/WinForms/MainForm.cs @@ -477,7 +477,7 @@ namespace mpvnet height = windowSize.Height; width = height * videoSize.Width / videoSize.Height; } - else if (App.StartSize == "height-session") + else if (App.StartSize == "height-session" || App.StartSize == "session") { height = autoFitHeight; width = height * videoSize.Width / videoSize.Height; @@ -492,7 +492,7 @@ namespace mpvnet width = autoFitHeight / 9 * 16; height = (int)Math.Ceiling(width * videoSize.Height / (double)videoSize.Width); } - else if (KeepSize() && windowSize.Height != 0) + else if (App.StartSize == "always" && windowSize.Height != 0) { height = windowSize.Height; width = windowSize.Width;