diff --git a/UI/App.axaml.cs b/UI/App.axaml.cs
index 592b055b..f5689ac7 100644
--- a/UI/App.axaml.cs
+++ b/UI/App.axaml.cs
@@ -4,6 +4,7 @@
using Avalonia.Controls.Platform;
using Avalonia.Markup.Xaml;
using Avalonia.Styling;
+using Avalonia.Threading;
using Mesen.Config;
using Mesen.Interop;
using Mesen.Localization;
@@ -26,6 +27,11 @@ public override void Initialize()
} else {
RequestedThemeVariant = ConfigManager.Config.Preferences.Theme == MesenTheme.Dark ? ThemeVariant.Dark : ThemeVariant.Light;
}
+
+ Dispatcher.UIThread.UnhandledException += (s, e) => {
+ MesenMsgBox.ShowException(e.Exception);
+ e.Handled = true;
+ };
AvaloniaXamlLoader.Load(this);
ResourceHelper.LoadResources();
diff --git a/UI/Program.cs b/UI/Program.cs
index 89615428..a4dd847f 100644
--- a/UI/Program.cs
+++ b/UI/Program.cs
@@ -161,7 +161,7 @@ public static AppBuilder BuildAvaloniaApp()
.With(new X11PlatformOptions {
EnableInputFocusProxy = Environment.GetEnvironmentVariable("XDG_CURRENT_DESKTOP") == "gamescope",
})
- .With(new AvaloniaNativePlatformOptions { })
+ .With(new AvaloniaNativePlatformOptions { RenderingMode = new AvaloniaNativeRenderingMode[] { AvaloniaNativeRenderingMode.OpenGl, AvaloniaNativeRenderingMode.Software } })
.LogToTrace();
}
}
diff --git a/UI/UI.csproj b/UI/UI.csproj
index 95488404..d0e61603 100644
--- a/UI/UI.csproj
+++ b/UI/UI.csproj
@@ -104,19 +104,18 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
+
diff --git a/UI/Views/OtherConsolesConfigView.axaml b/UI/Views/OtherConsolesConfigView.axaml
index 1c2d63cb..bec5e20e 100644
--- a/UI/Views/OtherConsolesConfigView.axaml
+++ b/UI/Views/OtherConsolesConfigView.axaml
@@ -24,7 +24,7 @@
-
+