5.9.0.0 Beta

This commit is contained in:
stax76
2022-05-08 15:01:45 +02:00
parent 3b9368230c
commit d9afd172f9
4 changed files with 41 additions and 32 deletions

View File

@@ -1,6 +1,9 @@
- Fix keyboard layout change.
- Fix multi monitor setup with different DPI values.
5.9.0.0 Beta (2022-05-08)
- Fix startup without media file not working with gpu-api=vulkan.
- Fix keyboard layout change not working.
- Fix multi monitor setup with different DPI values not working.
- Fix config editor handling `keep-open` and `keep-open-pause` incorrectly.
- New mpv.net specific option `keep-open-exit` added. If set to yes and
keep-open is set to no, mpv.net exits after the last file ends.

View File

@@ -44,7 +44,6 @@ namespace mpvnet
try
{
Instance = this;
Core.Init(Handle);
Core.Shutdown += Core_Shutdown;
Core.ShowMenu += Core_ShowMenu;
@@ -55,27 +54,8 @@ namespace mpvnet
Core.Seek += () => UpdateProgressBar();
Core.PlaylistPosChanged += (value) => SetTitle();
Core.ObserveProperty("window-maximized", PropChangeWindowMaximized);
Core.ObserveProperty("window-minimized", PropChangeWindowMinimized);
Core.ObservePropertyBool("border", PropChangeBorder);
Core.ObservePropertyBool("fullscreen", PropChangeFullscreen);
Core.ObservePropertyBool("keepaspect-window", value => Core.KeepaspectWindow = value);
Core.ObservePropertyBool("ontop", PropChangeOnTop);
Core.ObservePropertyBool("pause", PropChangePause);
Core.ObservePropertyString("sid", PropChangeSid);
Core.ObservePropertyString("aid", PropChangeAid);
Core.ObservePropertyString("vid", PropChangeVid);
Core.ObservePropertyString("title", PropChangeTitle);
Core.ObservePropertyInt("edition", PropChangeEdition);
Core.ObservePropertyDouble("window-scale", WindowScale);
if (Core.GPUAPI != "vulkan")
Core.ProcessCommandLine(false);
Init();
AppDomain.CurrentDomain.UnhandledException += (sender, e) => App.ShowException(e.ExceptionObject);
Application.ThreadException += (sender, e) => App.ShowException(e.Exception);
@@ -135,7 +115,33 @@ namespace mpvnet
}
}
private void Core_ShowMenu()
void Init()
{
Core.Init(Handle);
Core.ObserveProperty("window-maximized", PropChangeWindowMaximized);
Core.ObserveProperty("window-minimized", PropChangeWindowMinimized);
Core.ObservePropertyBool("border", PropChangeBorder);
Core.ObservePropertyBool("fullscreen", PropChangeFullscreen);
Core.ObservePropertyBool("keepaspect-window", value => Core.KeepaspectWindow = value);
Core.ObservePropertyBool("ontop", PropChangeOnTop);
Core.ObservePropertyBool("pause", PropChangePause);
Core.ObservePropertyString("sid", PropChangeSid);
Core.ObservePropertyString("aid", PropChangeAid);
Core.ObservePropertyString("vid", PropChangeVid);
Core.ObservePropertyString("title", PropChangeTitle);
Core.ObservePropertyInt("edition", PropChangeEdition);
Core.ObservePropertyDouble("window-scale", WindowScale);
Core.ProcessCommandLine(false);
}
void Core_ShowMenu()
{
BeginInvoke(new Action(() => {
if (IsMouseInOSC())
@@ -1026,7 +1032,8 @@ namespace mpvnet
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
Core.VideoSizeAutoResetEvent.WaitOne(App.StartThreshold);
if (Core.GPUAPI != "vulkan")
Core.VideoSizeAutoResetEvent.WaitOne(App.StartThreshold);
LastCycleFullscreen = Environment.TickCount;
SetFormPosAndSize();
}
@@ -1041,12 +1048,12 @@ namespace mpvnet
{
base.OnShown(e);
if (Core.GPUAPI == "vulkan")
Init();
if (WindowState == FormWindowState.Maximized)
Core.SetPropertyBool("window-maximized", true);
if (Core.GPUAPI == "vulkan")
Core.ProcessCommandLine(false);
WPF.Init();
App.UpdateWpfColors();
MessageBoxEx.MessageForeground = Theme.Current.GetBrush("heading");

View File

@@ -116,7 +116,6 @@ namespace mpvnet
if (Handle == IntPtr.Zero)
throw new Exception("error mpv_create");
mpv_request_log_messages(Handle, "terminal-default");
App.RunTask(() => EventLoop());
@@ -1287,7 +1286,7 @@ namespace mpvnet
public void ShowLogo()
{
if (!App.ShowLogo || MainForm.Instance == null)
if (!App.ShowLogo || MainForm.Instance == null || Core.Handle == IntPtr.Zero)
return;
bool december = DateTime.Now.Month == 12;

View File

@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("5.8.0.0")]
[assembly: AssemblyFileVersion("5.8.0.0")]
[assembly: AssemblyVersion("5.9.0.0")]
[assembly: AssemblyFileVersion("5.9.0.0")]