diff --git a/Changelog.md b/Changelog.md index 76becd3..17bfe5f 100644 --- a/Changelog.md +++ b/Changelog.md @@ -11,6 +11,8 @@ - fix: update routine did only work when mpv.net was located in 'Program Files' - fix: errors were just ignored and only seen printed in the terminal in case mpv.net was started from the terminal, now for every error a message box is shown +- fix: when start-size=video was used then enlarging or shrinking the window + size was broken ### 5.4.4.0 diff --git a/mpv.net/Native/TaskDialog.cs b/mpv.net/Native/TaskDialog.cs index 14a73a7..7022d20 100644 --- a/mpv.net/Native/TaskDialog.cs +++ b/mpv.net/Native/TaskDialog.cs @@ -358,7 +358,7 @@ public class TaskDialog : TaskDialogNative, IDisposable return value; } - public void AddCommandLink(string text, T value) + public void AddCommand(string text, T value) { int n = 1000 + IdValueDic.Count + 1; IdValueDic[n] = value; @@ -367,7 +367,7 @@ public class TaskDialog : TaskDialogNative, IDisposable Config.dwFlags |= TaskDialogNative.TASKDIALOG_FLAGS.TDF_USE_COMMAND_LINKS; } - public void AddCommandLink(string text, string description, T value, bool setShield = false) + public void AddCommand(string text, string description, T value, bool setShield = false) { int n = 1000 + IdValueDic.Count + 1; IdValueDic[n] = value; diff --git a/mpv.net/Properties/AssemblyInfo.cs b/mpv.net/Properties/AssemblyInfo.cs index a83f32a..cacff91 100644 --- a/mpv.net/Properties/AssemblyInfo.cs +++ b/mpv.net/Properties/AssemblyInfo.cs @@ -10,7 +10,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Frank Skare (stax76)")] [assembly: AssemblyProduct("mpv.net")] -[assembly: AssemblyCopyright("Copyright (c) 2017-2019 Frank Skare (stax76)")] +[assembly: AssemblyCopyright("Copyright (C) 2017-2020 Frank Skare (stax76)")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/mpv.net/Resources/inputConf.txt b/mpv.net/Resources/inputConf.txt index e599cd2..d4787d9 100644 --- a/mpv.net/Resources/inputConf.txt +++ b/mpv.net/Resources/inputConf.txt @@ -1,6 +1,6 @@ # This file defines the key and mouse bindings and the context menu - # of mpv.net. A input and config editor can be found in mpv.net's + # of mpv.net. A input and config editor can be found in mpv.nets # context menu under 'Settings'. The defaults of this file can be found at: # https://github.com/stax76/mpv.net/blob/master/mpv.net/Resources/inputConf.txt @@ -12,7 +12,7 @@ # mpv.net's defaults of mpv.conf contain: 'input-default-bindings = no' # which disables mpv's input defaults. Every line in this file begins with a # space character to make it easier to do a text search, so if you want to know - # if 'o' has already a binding you can make a text search on ' o '. + # if 'o' has already a binding you can do a text search on ' o '. # mpv input commands: https://mpv.io/manual/master/#list-of-input-commands diff --git a/mpv.net/WPF/EverythingWindow.xaml.cs b/mpv.net/WPF/EverythingWindow.xaml.cs index f76fb88..5cd7e5a 100644 --- a/mpv.net/WPF/EverythingWindow.xaml.cs +++ b/mpv.net/WPF/EverythingWindow.xaml.cs @@ -137,12 +137,13 @@ namespace mpvnet Everything_GetResultFullPathName(i, buf, bufsize); string ext = buf.ToString().ShortExt(); - if (App.AudioTypes.Contains(ext) || App.VideoTypes.Contains(ext) || - App.ImageTypes.Contains(ext)) + if (App.AudioTypes.Contains(ext) || App.VideoTypes.Contains(ext) + || App.ImageTypes.Contains(ext)) items.Add(buf.ToString()); - if (items.Count > 100) break; + if (items.Count > 100) + break; } Application.Current.Dispatcher.Invoke(() => { diff --git a/mpv.net/WinForms/MainForm.cs b/mpv.net/WinForms/MainForm.cs index b2415ad..47e9350 100644 --- a/mpv.net/WinForms/MainForm.cs +++ b/mpv.net/WinForms/MainForm.cs @@ -279,9 +279,9 @@ namespace mpvnet Size size = mp.VideoSize; int height = size.Height; - if (App.RememberHeight) + if (App.RememberHeight || scale != 1) { - if (WasInitialSizeSet) + if (WasInitialSizeSet || scale != 1) height = ClientSize.Height; else { @@ -595,7 +595,7 @@ namespace mpvnet { if (value != 1) { - BeginInvoke(new Action(() => SetFormPosAndSize(value))); + Invoke(new Action(() => SetFormPosAndSize(value))); mp.command("no-osd set window-scale 1"); } } diff --git a/mpv.net/mpv/mp.cs b/mpv.net/mpv/mp.cs index 0e30e00..e2e01bb 100644 --- a/mpv.net/mpv/mp.cs +++ b/mpv.net/mpv/mp.cs @@ -172,9 +172,9 @@ namespace mpvnet using (TaskDialog td = new TaskDialog()) { td.MainInstruction = "Choose a settings folder."; - td.AddCommandLink(@"AppData\Roaming\mpv.net", appdataFolder, appdataFolder); - td.AddCommandLink(@"\portable_config", portableFolder, portableFolder); - td.AddCommandLink("Choose custom folder", "custom"); + td.AddCommand(@"AppData\Roaming\mpv.net", appdataFolder, appdataFolder); + td.AddCommand(@"\portable_config", portableFolder, portableFolder); + td.AddCommand("Choose custom folder", "custom"); _ConfigFolder = td.Show(); } @@ -712,10 +712,12 @@ namespace mpvnet switch (argument) { case "--list-properties=yes": - var list = get_property_string("property-list").Split(',').ToList(); - list.Sort(); - Console.WriteLine(string.Join("\r\n", list.ToArray())); - return true; + { + var list = get_property_string("property-list").Split(',').ToList(); + list.Sort(); + Console.WriteLine(string.Join("\n", list.ToArray())); + return true; + } } return false;