mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-08-12 05:05:26 +02:00
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
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user