From 4b33d086ec158f0a434ec1845423705393700456 Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Wed, 9 Dec 2020 22:44:24 +0000 Subject: [PATCH] [Windows] only enable egl by default on platforms where its stable. --- samples/ControlCatalog.NetCore/Program.cs | 3 +-- src/Windows/Avalonia.Win32/Win32Platform.cs | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/ControlCatalog.NetCore/Program.cs b/samples/ControlCatalog.NetCore/Program.cs index 1dc8c09c0e..d7c5bd4415 100644 --- a/samples/ControlCatalog.NetCore/Program.cs +++ b/samples/ControlCatalog.NetCore/Program.cs @@ -113,8 +113,7 @@ namespace ControlCatalog.NetCore }) .With(new Win32PlatformOptions { - EnableMultitouch = true, - AllowEglInitialization = true + EnableMultitouch = true }) .UseSkia() .UseManagedSystemDialogs() diff --git a/src/Windows/Avalonia.Win32/Win32Platform.cs b/src/Windows/Avalonia.Win32/Win32Platform.cs index 97eb0c6119..a43947a7ff 100644 --- a/src/Windows/Avalonia.Win32/Win32Platform.cs +++ b/src/Windows/Avalonia.Win32/Win32Platform.cs @@ -17,6 +17,7 @@ using Avalonia.Platform; using Avalonia.Rendering; using Avalonia.Threading; using Avalonia.Utilities; +using Avalonia.Win32; using Avalonia.Win32.Input; using Avalonia.Win32.Interop; using static Avalonia.Win32.Interop.UnmanagedMethods; @@ -39,7 +40,7 @@ namespace Avalonia public class Win32PlatformOptions { public bool UseDeferredRendering { get; set; } = true; - public bool AllowEglInitialization { get; set; } = true; + public bool AllowEglInitialization { get; set; } = Win32Platform.WindowsVersion > new Version(6, 1); public bool? EnableMultitouch { get; set; } public bool OverlayPopups { get; set; } public bool UseWgl { get; set; }