From 7d9a5feccbedc32dfeec00478c3a67ffff26dc60 Mon Sep 17 00:00:00 2001 From: Emmanuel Hansen Date: Mon, 11 Jul 2022 22:25:33 +0000 Subject: Avalonia - Couple fixes and improvements (#3451) * fix updater check crash * remove line * reduce cheat window sizes * enable tiered compilation and r2r * remove warning on LaunchState * remove warnings related to tasks * addressed review * undo csproj indentation * fix tabs in axaml file * remove double line * remove R2R --- Ryujinx.Ava/Ui/Windows/TitleUpdateWindow.axaml.cs | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'Ryujinx.Ava/Ui/Windows/TitleUpdateWindow.axaml.cs') diff --git a/Ryujinx.Ava/Ui/Windows/TitleUpdateWindow.axaml.cs b/Ryujinx.Ava/Ui/Windows/TitleUpdateWindow.axaml.cs index edc1abcd..e465dc6e 100644 --- a/Ryujinx.Ava/Ui/Windows/TitleUpdateWindow.axaml.cs +++ b/Ryujinx.Ava/Ui/Windows/TitleUpdateWindow.axaml.cs @@ -24,6 +24,7 @@ using System.Text; using Path = System.IO.Path; using SpanHelpers = LibHac.Common.SpanHelpers; using LibHac.Tools.FsSystem; +using Avalonia.Threading; namespace Ryujinx.Ava.Ui.Windows { @@ -151,14 +152,20 @@ namespace Ryujinx.Ava.Ui.Windows } else { - ContentDialogHelper.CreateErrorDialog(this, - LocaleManager.Instance["DialogUpdateAddUpdateErrorMessage"]); + Dispatcher.UIThread.Post(async () => + { + await ContentDialogHelper.CreateErrorDialog(this, + LocaleManager.Instance["DialogUpdateAddUpdateErrorMessage"]); + }); } } catch (Exception ex) { - ContentDialogHelper.CreateErrorDialog(this, - string.Format(LocaleManager.Instance["DialogDlcLoadNcaErrorMessage"], ex.Message, path)); + Dispatcher.UIThread.Post(async () => + { + await ContentDialogHelper.CreateErrorDialog(this, + string.Format(LocaleManager.Instance["DialogDlcLoadNcaErrorMessage"], ex.Message, path)); + }); } } } -- cgit v1.2.3