no more windows???
This commit is contained in:
@@ -5,12 +5,13 @@
|
|||||||
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
|
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
|
||||||
<UseWindowsForms>True</UseWindowsForms>
|
<UseWindowsForms>True</UseWindowsForms>
|
||||||
<TargetFramework>netstandard2.1</TargetFramework>
|
<TargetFramework>netstandard2.1</TargetFramework>
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<Platforms>AnyCPU</Platforms>
|
<Platforms>AnyCPU</Platforms>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<LangVersion>9.0</LangVersion>
|
<LangVersion>9.0</LangVersion>
|
||||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||||
|
<GenerateResourceUsePreserializedResources>true</GenerateResourceUsePreserializedResources>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<RootNamespace />
|
<RootNamespace />
|
||||||
@@ -22,5 +23,6 @@
|
|||||||
<PackageReference Include="OpenGL.Net" Version="0.8.4" />
|
<PackageReference Include="OpenGL.Net" Version="0.8.4" />
|
||||||
<PackageReference Include="System.Collections" Version="4.3.0" />
|
<PackageReference Include="System.Collections" Version="4.3.0" />
|
||||||
<PackageReference Include="System.Drawing.Common" Version="5.0.3" />
|
<PackageReference Include="System.Drawing.Common" Version="5.0.3" />
|
||||||
|
<PackageReference Include="System.Resources.Extensions" Version="7.0.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
@@ -110,11 +110,11 @@ namespace _2DGAMELIB
|
|||||||
|
|
||||||
public Med()
|
public Med()
|
||||||
{
|
{
|
||||||
Point dpi = GetDpi();
|
//Point dpi = GetDpi();
|
||||||
dpiX = dpi.X;
|
//dpiX = dpi.X;
|
||||||
dpiY = dpi.Y;
|
//dpiY = dpi.Y;
|
||||||
DpiX = 96.0 / dpiX;
|
DpiX = 1.0; // 96.0 / dpiX;
|
||||||
DpiY = 96.0 / dpiY;
|
DpiY = 1.0; // 96.0 / dpiY;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void FadeIn(double Rate)
|
public void FadeIn(double Rate)
|
||||||
@@ -440,26 +440,27 @@ namespace _2DGAMELIB
|
|||||||
Sce.Dispose();
|
Sce.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
[DllImport("user32.dll")]
|
//[DllImport("user32.dll")]
|
||||||
private static extern bool SetProcessDPIAware();
|
//private static extern bool SetProcessDPIAware();
|
||||||
|
|
||||||
[DllImport("user32.dll")]
|
//[DllImport("user32.dll")]
|
||||||
private static extern IntPtr GetWindowDC(IntPtr hwnd);
|
//private static extern IntPtr GetWindowDC(IntPtr hwnd);
|
||||||
|
|
||||||
[DllImport("gdi32.dll")]
|
//[DllImport("gdi32.dll")]
|
||||||
private static extern int GetDeviceCaps(IntPtr hdc, int index);
|
//private static extern int GetDeviceCaps(IntPtr hdc, int index);
|
||||||
|
|
||||||
[DllImport("user32.dll")]
|
//[DllImport("user32.dll")]
|
||||||
private static extern int ReleaseDC(IntPtr hwnd, IntPtr hdc);
|
//private static extern int ReleaseDC(IntPtr hwnd, IntPtr hdc);
|
||||||
|
|
||||||
|
/*
|
||||||
public static Point GetDpi()
|
public static Point GetDpi()
|
||||||
{
|
{
|
||||||
SetProcessDPIAware();
|
//SetProcessDPIAware();
|
||||||
IntPtr windowDC = GetWindowDC(IntPtr.Zero);
|
//IntPtr windowDC = GetWindowDC(IntPtr.Zero);
|
||||||
Point result = new Point(GetDeviceCaps(windowDC, 88), GetDeviceCaps(windowDC, 90));
|
//Point result = new Point(GetDeviceCaps(windowDC, 88), GetDeviceCaps(windowDC, 90));
|
||||||
ReleaseDC(IntPtr.Zero, windowDC);
|
//ReleaseDC(IntPtr.Zero, windowDC);
|
||||||
return result;
|
//return result;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
static Med()
|
static Med()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
|
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<LangVersion>9.0</LangVersion>
|
<LangVersion>9.0</LangVersion>
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user