diff --git a/Changelog.md b/Changelog.md index cf8e106..64cb9af 100644 --- a/Changelog.md +++ b/Changelog.md @@ -4,11 +4,11 @@ - bug fix for logo not shown on start - osd-visibility.js script was removed because the OSC uses too much memory - youtube-dl was updated -- in case mpv.net is started from a terminal it sets now the mpv property input-terminal to yes, - this means mpv.net will now receive input keys from the terminal -- command line processing was improved, certain properties didn't work, now they should work: - (input-terminal, terminal, input-file, config, config-dir, input-conf, - load-scripts, script, scripts, player-operation-mode) +- libmpv was updated to shinchiro 2019-08-04 +- in case mpv.net was started from a terminal it sets now the mpv property input-terminal to yes, + this means mpv.net will now receive and handle input keys from the terminal +- certain command line properties didn't work (input-terminal, terminal, input-file, + config, config-dir, input-conf, load-scripts, script, scripts, player-operation-mode) - the about dialog shows now the mpv version and build date ### 5.1 diff --git a/mpv.net/Misc/Program.cs b/mpv.net/Misc/Program.cs index 3877f93..f63ffc8 100644 --- a/mpv.net/Misc/Program.cs +++ b/mpv.net/Misc/Program.cs @@ -18,6 +18,8 @@ namespace mpvnet Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); + if (mp.ConfigFolder == "") return; + string[] args = Environment.GetCommandLineArgs().Skip(1).ToArray(); if (args.Length == 2 && args[0] == "--reg-file-assoc") diff --git a/mpv.net/Native/TaskDialog.cs b/mpv.net/Native/TaskDialog.cs index c671199..bccdd68 100644 --- a/mpv.net/Native/TaskDialog.cs +++ b/mpv.net/Native/TaskDialog.cs @@ -359,7 +359,7 @@ public class TaskDialog : TaskDialogNative, IDisposable public void AddCommandLink(string text, T value) { int n = 1000 + IdValueDic.Count + 1; - IdValueDic[n] = value == null ? (T)(object)text : value; + IdValueDic[n] = value; IdTextDic[n] = text; Buttons.Add(new TaskDialogNative.TASKDIALOG_BUTTON(n, text)); Config.dwFlags |= TaskDialogNative.TASKDIALOG_FLAGS.TDF_USE_COMMAND_LINKS; diff --git a/mpv.net/WinForms/MainForm.cs b/mpv.net/WinForms/MainForm.cs index 4db0ef6..98ff7a0 100644 --- a/mpv.net/WinForms/MainForm.cs +++ b/mpv.net/WinForms/MainForm.cs @@ -83,7 +83,6 @@ namespace mpvnet if (mp.GPUAPI != "vulkan") mp.VideoSizeAutoResetEvent.WaitOne(App.StartThreshold); if (Height < FontHeight * 4) SetFormPosAndSize(); - if (mp.get_property_int("playlist-count") == 0) mp.ShowLogo(); } catch (Exception ex) { @@ -508,6 +507,12 @@ namespace mpvnet })); } + protected override void OnLoad(EventArgs e) + { + base.OnLoad(e); + if (mp.get_property_int("playlist-count") == 0) mp.ShowLogo(); + } + protected override void OnShown(EventArgs e) { base.OnShown(e); diff --git a/mpv.net/mpv/mp.cs b/mpv.net/mpv/mp.cs index 3d472e9..2c8e23b 100644 --- a/mpv.net/mpv/mp.cs +++ b/mpv.net/mpv/mp.cs @@ -166,10 +166,15 @@ namespace mpvnet td.AddCommandLink(@"AppData\Roaming\mpv", appdataFolderMpv, appdataFolderMpv); td.AddCommandLink("\\portable_config", portableFolder, portableFolder); td.AddCommandLink("Choose custom folder", "custom"); - td.AllowCancel = false; _ConfigFolder = td.Show(); } + if (_ConfigFolder == null) + { + _ConfigFolder = ""; + return ""; + } + if (_ConfigFolder == "custom") { using (var d = new WinForms.FolderBrowserDialog())