diff options
| author | Emmanuel Hansen <emmausssss@gmail.com> | 2022-07-11 22:25:33 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-12 00:25:33 +0200 |
| commit | 7d9a5feccbedc32dfeec00478c3a67ffff26dc60 (patch) | |
| tree | c22b5d5eb5535824b4b5e54b137df1cf70c1b5f2 /Ryujinx.Ava/Ui/Windows/DlcManagerWindow.axaml.cs | |
| parent | 14ae4e276f81aa6511fb6d00c8d7b9998a88a1c8 (diff) | |
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
Diffstat (limited to 'Ryujinx.Ava/Ui/Windows/DlcManagerWindow.axaml.cs')
| -rw-r--r-- | Ryujinx.Ava/Ui/Windows/DlcManagerWindow.axaml.cs | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/Ryujinx.Ava/Ui/Windows/DlcManagerWindow.axaml.cs b/Ryujinx.Ava/Ui/Windows/DlcManagerWindow.axaml.cs index cb2ed324..7450c64f 100644 --- a/Ryujinx.Ava/Ui/Windows/DlcManagerWindow.axaml.cs +++ b/Ryujinx.Ava/Ui/Windows/DlcManagerWindow.axaml.cs @@ -2,6 +2,7 @@ using Avalonia; using Avalonia.Collections; using Avalonia.Controls; using Avalonia.Markup.Xaml; +using Avalonia.Threading; using LibHac.Common; using LibHac.Fs; using LibHac.Fs.Fsa; @@ -21,6 +22,7 @@ using System.Diagnostics; using System.IO; using System.Linq; using System.Text; +using System.Threading.Tasks; using Path = System.IO.Path; namespace Ryujinx.Ava.Ui.Windows @@ -125,15 +127,18 @@ namespace Ryujinx.Ava.Ui.Windows } catch (Exception ex) { - ContentDialogHelper.CreateErrorDialog(this, + Dispatcher.UIThread.InvokeAsync(async () => + { + await ContentDialogHelper.CreateErrorDialog(this, string.Format(LocaleManager.Instance[ "DialogDlcLoadNcaErrorMessage"], ex.Message, containerPath)); + }); } return null; } - private void AddDlc(string path) + private async Task AddDlc(string path) { if (!File.Exists(path) || Dlcs.FirstOrDefault(x => x.ContainerPath == path) != null) { @@ -175,7 +180,7 @@ namespace Ryujinx.Ava.Ui.Windows if (!containsDlc) { - ContentDialogHelper.CreateErrorDialog(this, LocaleManager.Instance["DialogDlcNoDlcErrorMessage"]); + await ContentDialogHelper.CreateErrorDialog(this, LocaleManager.Instance["DialogDlcNoDlcErrorMessage"]); } } } @@ -214,7 +219,7 @@ namespace Ryujinx.Ava.Ui.Windows { foreach (string file in files) { - AddDlc(file); + await AddDlc(file); } } } |
