mirror of
https://gitee.com/csharpui/CPF.git
synced 2025-11-24 08:33:23 +08:00
解决JSON序列化的BUG和PInvoke函数与Unity兼容问题
This commit is contained in:
@@ -1490,8 +1490,10 @@ BLENDFUNCTION blendFunction // alpha-blending function
|
||||
//[DllImport("shell32.dll", CharSet = CharSet.Auto)]
|
||||
//public static extern int DragQueryFile(HandleRef hDrop, int iFile, StringBuilder lpszFile, int cch);
|
||||
|
||||
[DllImport("dwmapi.dll", PreserveSig = false)]
|
||||
public static extern bool DwmIsCompositionEnabled();
|
||||
//[DllImport("dwmapi.dll", PreserveSig = false)]
|
||||
//public static extern bool DwmIsCompositionEnabled();
|
||||
[DllImport("dwmapi.dll", BestFitMapping = false)]
|
||||
public static extern int DwmIsCompositionEnabled(out Int32 enabled);
|
||||
|
||||
[DllImport("dwmapi.dll")]
|
||||
public static extern int DwmEnableBlurBehindWindow(IntPtr hWnd, ref DWM_BLURBEHIND pBlurBehind);
|
||||
|
||||
@@ -83,7 +83,7 @@ namespace CPF.Windows
|
||||
}
|
||||
posttime = Application.Elapsed;
|
||||
var v = System.Environment.OSVersion.Version;
|
||||
if (v.Major >= 6 && DwmIsCompositionEnabled() && !Application.DesignMode)
|
||||
if (v.Major >= 6 && DwmIsCompositionEnabled(out var e) == 0 && e == 1 && !Application.DesignMode)
|
||||
{
|
||||
}
|
||||
else
|
||||
@@ -92,7 +92,7 @@ namespace CPF.Windows
|
||||
}
|
||||
if ((v.Major == 6 && v.Minor < 2))
|
||||
{
|
||||
touchMsg = RegisterTouchWindow(handle, RegisterTouchFlags.TWF_NONE);
|
||||
touchMsg = RegisterTouchWindow(handle, RegisterTouchFlags.TWF_NONE);
|
||||
}
|
||||
_className = "CPFWindow-" + Guid.NewGuid();
|
||||
// 初始化窗口类结构
|
||||
|
||||
Reference in New Issue
Block a user