changelog

This commit is contained in:
Frank Skare
2020-04-15 04:03:06 +02:00
parent 722e06a02b
commit d586a82e37
3 changed files with 15 additions and 11 deletions

View File

@@ -1,13 +1,13 @@
5.4.4.3 5.4.4.3 Beta (not yet released)
======= ============
new new
--- ---
- update MediaInfo 20.03 - update MediaInfo 20.03
- mpv property window-maximized support added, cycling it from input.conf - mpv property window-maximized support added, cycling it from input.conf
might not be 100% reliable, it's likely a bug in the mpv client API and might not be 100% reliable, use native Windows shortcuts Win+Up, Win+Down
will be further investigated soon
### 5.4.4.2 ### 5.4.4.2

View File

@@ -13,6 +13,7 @@ using System.Threading.Tasks;
using UI; using UI;
using ScriptHost; using ScriptHost;
using System.Threading;
namespace mpvnet namespace mpvnet
{ {
@@ -24,10 +25,10 @@ namespace mpvnet
Point LastCursorPosChanged; Point LastCursorPosChanged;
int LastCursorChangedTickCount; int LastCursorChangedTickCount;
int TaskbarButtonCreatedMessage; int TaskbarButtonCreatedMessage;
bool WasShown;
DateTime LastCycleFullscreen; DateTime LastCycleFullscreen;
Taskbar Taskbar; Taskbar Taskbar;
List<string> RecentFiles; List<string> RecentFiles;
int ShownTickCount;
public MainForm() public MainForm()
{ {
@@ -126,6 +127,8 @@ namespace mpvnet
BeginInvoke(new Action(() => Text = "mpv.net " + Application.ProductVersion)); BeginInvoke(new Action(() => Text = "mpv.net " + Application.ProductVersion));
} }
bool WasShown() => ShownTickCount != 0 && Environment.TickCount > ShownTickCount + 500;
void CM_Popup(object sender, EventArgs e) => CursorHelp.Show(); void CM_Popup(object sender, EventArgs e) => CursorHelp.Show();
void VideoSizeChanged() => BeginInvoke(new Action(() => SetFormPosAndSize())); void VideoSizeChanged() => BeginInvoke(new Action(() => SetFormPosAndSize()));
@@ -499,7 +502,7 @@ namespace mpvnet
break; break;
case 0x02E0: // WM_DPICHANGED case 0x02E0: // WM_DPICHANGED
{ {
if (!WasShown) if (!WasShown())
break; break;
WinAPI.RECT rect = Marshal.PtrToStructure<WinAPI.RECT>(m.LParam); WinAPI.RECT rect = Marshal.PtrToStructure<WinAPI.RECT>(m.LParam);
@@ -606,13 +609,13 @@ namespace mpvnet
void PropChangeWindowMaximized(bool enabled) void PropChangeWindowMaximized(bool enabled)
{ {
//TODO: this might not be reliable if (!WasShown())
if (!WasShown)
return; return;
mp.WindowMaximized = enabled; mp.WindowMaximized = enabled;
Invoke(new Action(() => { BeginInvoke(new Action(() =>
{
if (mp.WindowMaximized && WindowState != FormWindowState.Maximized) if (mp.WindowMaximized && WindowState != FormWindowState.Maximized)
WindowState = FormWindowState.Maximized; WindowState = FormWindowState.Maximized;
else if (!mp.WindowMaximized && WindowState == FormWindowState.Maximized) else if (!mp.WindowMaximized && WindowState == FormWindowState.Maximized)
@@ -678,7 +681,7 @@ namespace mpvnet
UpdateCheck.DailyCheck(); UpdateCheck.DailyCheck();
mp.LoadScripts(); mp.LoadScripts();
Task.Run(() => App.Extension = new Extension()); Task.Run(() => App.Extension = new Extension());
WasShown = true; ShownTickCount = Environment.TickCount;
} }
protected override void OnResize(EventArgs e) protected override void OnResize(EventArgs e)

View File

@@ -327,7 +327,7 @@ namespace mpvnet
if (WindowHandle == IntPtr.Zero) if (WindowHandle == IntPtr.Zero)
WindowHandle = FindWindowEx(MainForm.Hwnd, IntPtr.Zero, "mpv", null); WindowHandle = FindWindowEx(MainForm.Hwnd, IntPtr.Zero, "mpv", null);
// Debug.WriteLine(evt.event_id.ToString()); //Debug.WriteLine(evt.event_id.ToString());
try try
{ {
@@ -436,6 +436,7 @@ namespace mpvnet
case mpv_event_id.MPV_EVENT_PROPERTY_CHANGE: case mpv_event_id.MPV_EVENT_PROPERTY_CHANGE:
{ {
var data = (mpv_event_property)Marshal.PtrToStructure(evt.data, typeof(mpv_event_property)); var data = (mpv_event_property)Marshal.PtrToStructure(evt.data, typeof(mpv_event_property));
//Debug.WriteLine(data.name);
if (data.format == mpv_format.MPV_FORMAT_FLAG) if (data.format == mpv_format.MPV_FORMAT_FLAG)
{ {