1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2025-05-05 02:34:07 +02:00

Enable high DPI awareness for video player process

Closes 
This commit is contained in:
chylex 2018-07-09 18:14:58 +02:00
parent 3f44f3bab4
commit 502ac4ebc1
2 changed files with 4 additions and 0 deletions

View File

@ -18,6 +18,9 @@ static class NativeMethods{
[DllImport("user32.dll")]
public static extern IntPtr GetForegroundWindow();
[DllImport("user32.dll")]
public static extern bool SetProcessDPIAware();
[StructLayout(LayoutKind.Sequential)]
public struct RECT{
public int Left;

View File

@ -19,6 +19,7 @@ static class Program{
private static int Main(string[] args){
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
NativeMethods.SetProcessDPIAware();
Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
CultureInfo.DefaultThreadCurrentCulture = CultureInfo.InvariantCulture;