This commit is contained in:
Frank Skare
2021-07-19 02:33:32 +02:00
parent fbeeb3f015
commit e1c9d81496
8 changed files with 252 additions and 214 deletions

View File

@@ -129,7 +129,7 @@ namespace mpvnet
App.RunTask(() => EventLoop());
if (App.IsStartedFromTerminal)
if (App.IsTerminalAttached)
{
SetPropertyString("terminal", "yes");
SetPropertyString("input-terminal", "yes");
@@ -1061,7 +1061,7 @@ namespace mpvnet
}
catch (Exception e)
{
if (!App.IsStartedFromTerminal)
if (!App.IsTerminalAttached)
Msg.ShowException(e);
}
}
@@ -1290,7 +1290,7 @@ namespace mpvnet
gx.DrawImage(bmp2, rect);
BitmapData bd = bmp.LockBits(rect, ImageLockMode.ReadOnly, PixelFormat.Format32bppPArgb);
int x = Convert.ToInt32((cr.Width - len) / (december ? 1.95 : 2));
int y = Convert.ToInt32(((cr.Height - len) / 2.0) * (december ? 0.85 : 0.9));
int y = Convert.ToInt32((cr.Height - len) / 2.0 * (december ? 0.85 : 0.9));
CommandV("overlay-add", "0", $"{x}", $"{y}", "&" + bd.Scan0.ToInt64().ToString(), "0", "bgra", bd.Width.ToString(), bd.Height.ToString(), bd.Stride.ToString());
bmp.UnlockBits(bd);
IsLogoVisible = true;