Skip to content

Commit

Permalink
Update Program.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
13584452567 committed Nov 19, 2024
1 parent 499a6f4 commit 4ff37f7
Showing 1 changed file with 31 additions and 14 deletions.
45 changes: 31 additions & 14 deletions UotanToolbox/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,23 +68,40 @@ public static AppBuilder BuildAvaloniaApp()
}
}
Global.bin_path = Path.Combine(Global.runpath, "Bin");
Global.serviceID = "studio-" + StringHelper.RandomString(8);
Global.serviceID = "uotan-" + StringHelper.RandomString(8);
Global.password = StringHelper.RandomString(8);
// No need to set default for Windows
var app = AppBuilder.Configure<App>()
.UsePlatformDetect()
.With(new Win32PlatformOptions
AppBuilder app = AppBuilder.Configure<App>();
if (OperatingSystem.IsWindows())
{
if (RuntimeInformation.OSArchitecture == Architecture.X64)
{
RenderingMode = new[]
{
Win32RenderingMode.Vulkan
}
})
.WithInterFont()
#if DEBUG
.LogToTrace()
#endif
.UseXamlDisplay();
app = AppBuilder.Configure<App>()
.UsePlatformDetect()
.With(new Win32PlatformOptions
{
RenderingMode = new[]
{
Win32RenderingMode.Vulkan
}
})
.WithInterFont()
#if DEBUG
.LogToTrace()
#endif
.UseXamlDisplay();
}
}
else
{
app = AppBuilder.Configure<App>()
.UsePlatformDetect()
.WithInterFont()
#if DEBUG
.LogToTrace()
#endif
.UseXamlDisplay();
}
return app;
}
}

0 comments on commit 4ff37f7

Please sign in to comment.