From 0e92d4ec0ca586bcaddb7d7c25cd2cedfb09a97f Mon Sep 17 00:00:00 2001 From: Frank Skare Date: Wed, 6 May 2020 18:43:20 +0200 Subject: [PATCH] 5.4.7.0 --- Changelog.md | 10 +++++++++- mpv.net/Misc/PowerShell.cs | 6 ++++++ mpv.net/WinForms/MainForm.cs | 8 ++++---- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/Changelog.md b/Changelog.md index d8c7eb3..39eb6d9 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,9 +1,17 @@ -5.4.6.1 Beta (not yet released) +5.4.7.1 Beta (not yet released) ============ + + + +5.4.7.0 +======= + - log error fix - workaround to support AviSynth portable (ffmpeg blocks loading AviSynth from path env var) +- attempt to fix not reproducible volume input issue +- attempt to fix exception caused by powershell being not available on Win 7 5.4.6.0 diff --git a/mpv.net/Misc/PowerShell.cs b/mpv.net/Misc/PowerShell.cs index 904d766..836f606 100644 --- a/mpv.net/Misc/PowerShell.cs +++ b/mpv.net/Misc/PowerShell.cs @@ -233,6 +233,12 @@ namespace mpvnet var error = sender as PSDataCollection; ConsoleHelp.WriteError(error[e.Index], Module); } + + public static void Shutdown() + { + foreach (PowerShell ps in Instances) + ps.Runspace.Dispose(); + } } public class PowerShellException : Exception diff --git a/mpv.net/WinForms/MainForm.cs b/mpv.net/WinForms/MainForm.cs index 9afe93b..f2b1262 100644 --- a/mpv.net/WinForms/MainForm.cs +++ b/mpv.net/WinForms/MainForm.cs @@ -520,6 +520,9 @@ namespace mpvnet case 0x319: // WM_APPCOMMAND if (core.WindowHandle != IntPtr.Zero) m.Result = WinAPI.SendMessage(core.WindowHandle, m.Msg, m.WParam, m.LParam); + + if (m.Msg == 0x319) // WM_APPCOMMAND + return; break; case 0x0200: // WM_MOUSEMOVE if (Environment.TickCount - LastCycleFullscreen > 500) @@ -793,10 +796,7 @@ namespace mpvnet if (!core.ShutdownAutoResetEvent.WaitOne(10000)) Msg.ShowError("Shutdown thread failed to complete within 10 seconds."); - try { // PowerShell 5.1 might not be available - foreach (PowerShell ps in PowerShell.Instances) - ps.Runspace.Dispose(); - } catch {} + PowerShell.Shutdown(); } protected override void OnMouseDown(MouseEventArgs e)