mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-12-24 15:41:49 +01:00
Using directives matter
This commit is contained in:
parent
51ba40541a
commit
150476d6aa
@ -15,6 +15,7 @@ using System.Globalization;
|
||||
using Microsoft.Win32.TaskScheduler;
|
||||
using System.Security.Principal;
|
||||
using System.Threading;
|
||||
using System.Drawing.Drawing2D;
|
||||
using static DS4Windows.Global;
|
||||
|
||||
namespace DS4Windows
|
||||
@ -449,19 +450,17 @@ namespace DS4Windows
|
||||
hoverTextDict[StartWindowsCheckBox] = Properties.Resources.RunAtStartup;
|
||||
}
|
||||
|
||||
private Image AddUACShieldToImage(Image image)
|
||||
private void AddUACShieldToImage(Image image)
|
||||
{
|
||||
Bitmap shield = SystemIcons.Shield.ToBitmap();
|
||||
shield.MakeTransparent();
|
||||
|
||||
Graphics g = Graphics.FromImage(image);
|
||||
g.CompositingMode = System.Drawing.Drawing2D.CompositingMode.SourceOver;
|
||||
g.CompositingMode = CompositingMode.SourceOver;
|
||||
double aspectRatio = shield.Width / (double)shield.Height;
|
||||
int finalWidth = Convert.ToInt32(image.Height * aspectRatio);
|
||||
int finalHeight = Convert.ToInt32(image.Width / aspectRatio);
|
||||
g.DrawImage(shield, new Rectangle(0, 0, finalWidth, finalHeight));
|
||||
|
||||
return image;
|
||||
}
|
||||
|
||||
private void blankControllerTab()
|
||||
|
Loading…
Reference in New Issue
Block a user