Fix logo overlap using mordenx.lua

This commit is contained in:
stax76
2022-06-09 08:27:45 +02:00
parent d1b7250a7a
commit 71d6b96c10
2 changed files with 19 additions and 9 deletions

View File

@@ -69,19 +69,18 @@ namespace mpvnet
public Dictionary<string, List<Action<bool>>> BoolPropChangeActions { get; set; } = new Dictionary<string, List<Action<bool>>>();
public Dictionary<string, List<Action<double>>> DoublePropChangeActions { get; set; } = new Dictionary<string, List<Action<double>>>();
public Dictionary<string, List<Action<string>>> StringPropChangeActions { get; set; } = new Dictionary<string, List<Action<string>>>();
public List<MediaTrack> MediaTracks { get; set; } = new List<MediaTrack>();
public object MediaTracksLock { get; } = new object();
public List<KeyValuePair<string, double>> Chapters { get; set; } = new List<KeyValuePair<string, double>>();
public List<TimeSpan> BluRayTitles { get; } = new List<TimeSpan>();
public AutoResetEvent ShutdownAutoResetEvent { get; } = new AutoResetEvent(false);
public AutoResetEvent VideoSizeAutoResetEvent { get; } = new AutoResetEvent(false);
public IntPtr Handle { get; set; }
public IntPtr NamedHandle { get; set; }
public List<KeyValuePair<string, double>> Chapters { get; set; } = new List<KeyValuePair<string, double>>();
public List<MediaTrack> MediaTracks { get; set; } = new List<MediaTrack>();
public List<TimeSpan> BluRayTitles { get; } = new List<TimeSpan>();
public object MediaTracksLock { get; } = new object();
public Size VideoSize { get; set; }
public List<string> Scripts { get; } = new List<string>();
public TimeSpan Duration;
public AutoResetEvent ShutdownAutoResetEvent { get; } = new AutoResetEvent(false);
public AutoResetEvent VideoSizeAutoResetEvent { get; } = new AutoResetEvent(false);
public string ConfPath { get => ConfigFolder + "mpv.conf"; }
public string GPUAPI { get; set; } = "auto";
@@ -152,6 +151,12 @@ namespace mpvnet
Environment.SetEnvironmentVariable("mpv_client", "mpvnet");
string scriptsFolder = ConfigFolder + "scripts";
if (Directory.Exists(scriptsFolder))
foreach (string i in Directory.GetFiles(scriptsFolder))
Scripts.Add(i.FileName().ToLower());
mpv_error err = mpv_initialize(Handle);
if (err < 0)
@@ -1369,6 +1374,10 @@ namespace mpvnet
if (!App.ShowLogo || MainForm.Instance == null || Core.Handle == IntPtr.Zero)
return;
foreach (string i in Scripts)
if (i == "mordenx.lua")
return;
bool december = DateTime.Now.Month == 12;
Rectangle cr = MainForm.Instance.ClientRectangle;
int len = Convert.ToInt32(cr.Height / (december ? 4.5 : 5));