WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 22969c4

Browse files
committed
修复Windows on ARM
1 parent 78c34d6 commit 22969c4

File tree

1 file changed

+13
-16
lines changed

1 file changed

+13
-16
lines changed

UotanToolbox/Program.cs

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -72,25 +72,22 @@ public static AppBuilder BuildAvaloniaApp()
7272
Global.password = StringHelper.RandomString(8);
7373
// No need to set default for Windows
7474
AppBuilder app = AppBuilder.Configure<App>();
75-
if (OperatingSystem.IsWindows())
75+
if (OperatingSystem.IsWindows() && RuntimeInformation.OSArchitecture == Architecture.X64)
7676
{
77-
if (RuntimeInformation.OSArchitecture == Architecture.X64)
78-
{
79-
app = AppBuilder.Configure<App>()
80-
.UsePlatformDetect()
81-
.With(new Win32PlatformOptions
77+
app = AppBuilder.Configure<App>()
78+
.UsePlatformDetect()
79+
.With(new Win32PlatformOptions
80+
{
81+
RenderingMode = new[]
8282
{
83-
RenderingMode = new[]
84-
{
8583
Win32RenderingMode.Vulkan
86-
}
87-
})
88-
.WithInterFont()
89-
#if DEBUG
90-
.LogToTrace()
91-
#endif
92-
.UseXamlDisplay();
93-
}
84+
}
85+
})
86+
.WithInterFont()
87+
#if DEBUG
88+
.LogToTrace()
89+
#endif
90+
.UseXamlDisplay();
9491
}
9592
else
9693
{

0 commit comments

Comments
 (0)