Skip to content

Commit

Permalink
Потерявшийся импорт (как оно вообще собиралось?), фикс работы в ВМ MacOS
Browse files Browse the repository at this point in the history
  • Loading branch information
saber-nyan committed Jul 5, 2020
1 parent efcd819 commit cb8ab5a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
3 changes: 2 additions & 1 deletion ImagePoster4DTF/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Input;
using Avalonia.Interactivity;
Expand Down Expand Up @@ -424,7 +425,7 @@ private async void FireButton_OnClick(object sender, RoutedEventArgs ev) {
}

// Initialize editor
var post = await DtfClient.CreatePost();
await DtfClient.CreatePost();

// Upload files
_uploadProgressBar.IsIndeterminate = false;
Expand Down
12 changes: 10 additions & 2 deletions ImagePoster4DTF/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Avalonia.Logging.Serilog;
using Serilog;
using Serilog.Events;
using SharpGen.Runtime;

namespace ImagePoster4DTF {
internal static class Program {
Expand All @@ -15,8 +16,15 @@ internal static class Program {
// SynchronizationContext-reliant code before AppMain is called: things aren't initialized
// yet and stuff might break.
public static void Main(string[] args) {
BuildAvaloniaApp()
.StartWithClassicDesktopLifetime(args);
try {
BuildAvaloniaApp()
.StartWithClassicDesktopLifetime(args);
}
catch (SharpGenException) {
BuildAvaloniaApp()
.With(new AvaloniaNativePlatformOptions {UseGpu = false})
.StartWithClassicDesktopLifetime(args);
}
}

// Avalonia configuration, don't remove; also used by visual designer.
Expand Down

0 comments on commit cb8ab5a

Please sign in to comment.