-
This commit is contained in:
@@ -1,10 +1,11 @@
|
|||||||
###
|
###
|
||||||
|
|
||||||
- fix for middle mouse button not working
|
- fix for middle mouse button not working
|
||||||
- the config dialog was showing a message about app restart even when no
|
- fix of logo overlay using a huge amount of memory
|
||||||
settings were modified
|
- fix config dialog showing a message about app restart without reason
|
||||||
- when multiple files are selected in Windows File Explorer and enter is
|
- when multiple files are selected in Windows File Explorer and enter is
|
||||||
pressed, the files are opened, the order is random however
|
pressed, the files are opened as selected, the order is random though
|
||||||
|
because Explorer starts multiple mpv.net processes concurrently
|
||||||
- libmpv was updated to shinchiro 2019-06-30
|
- libmpv was updated to shinchiro 2019-06-30
|
||||||
|
|
||||||
### 4.5
|
### 4.5
|
||||||
|
|||||||
@@ -648,18 +648,20 @@ namespace mpvnet
|
|||||||
if (MainForm.Instance is null) return;
|
if (MainForm.Instance is null) return;
|
||||||
Rectangle cr = MainForm.Instance.ClientRectangle;
|
Rectangle cr = MainForm.Instance.ClientRectangle;
|
||||||
if (cr.Width == 0 || cr.Height == 0) return;
|
if (cr.Width == 0 || cr.Height == 0) return;
|
||||||
|
int len = cr.Height / 5;
|
||||||
|
|
||||||
using (Bitmap b = new Bitmap(cr.Width, cr.Height))
|
using (Bitmap b = new Bitmap(len, len))
|
||||||
{
|
{
|
||||||
using (Graphics g = Graphics.FromImage(b))
|
using (Graphics g = Graphics.FromImage(b))
|
||||||
{
|
{
|
||||||
g.InterpolationMode = InterpolationMode.HighQualityBicubic;
|
g.InterpolationMode = InterpolationMode.HighQualityBicubic;
|
||||||
g.Clear(Color.Black);
|
g.Clear(Color.Black);
|
||||||
int iconWidth = cr.Height / 7;
|
Rectangle rect = new Rectangle(0, 0, len, len);
|
||||||
Rectangle r = new Rectangle(cr.Width / 2 - iconWidth / 2, cr.Height / 2 - iconWidth / 2, iconWidth, iconWidth);
|
g.DrawImage(Properties.Resources.mpvnet, rect);
|
||||||
g.DrawImage(Properties.Resources.mpvnet, r);
|
BitmapData bd = b.LockBits(rect, ImageLockMode.ReadOnly, PixelFormat.Format32bppPArgb);
|
||||||
BitmapData bd = b.LockBits(cr, ImageLockMode.ReadOnly, PixelFormat.Format32bppPArgb);
|
int x = Convert.ToInt32((cr.Width - len) / 2.0);
|
||||||
commandv("overlay-add", "0", "0", "0", "&" + bd.Scan0.ToInt64().ToString(), "0", "bgra", bd.Width.ToString(), bd.Height.ToString(), bd.Stride.ToString());
|
int y = Convert.ToInt32(((cr.Height - len) / 2.0) * 0.9);
|
||||||
|
commandv("overlay-add", "0", $"{x}", $"{y}", "&" + bd.Scan0.ToInt64().ToString(), "0", "bgra", bd.Width.ToString(), bd.Height.ToString(), bd.Stride.ToString());
|
||||||
b.UnlockBits(bd);
|
b.UnlockBits(bd);
|
||||||
IsLogoVisible = true;
|
IsLogoVisible = true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user