mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-12-22 23:15:38 +00:00
Avalonia: Fix dialog issues caused by 1.1.1105 (#6211)
* Set _contentDialogOverlayWindow to null * Make CheckLaunchState async
This commit is contained in:
parent
4117c13377
commit
4e81ab4229
|
@ -388,6 +388,7 @@ namespace Ryujinx.Ava.UI.Helpers
|
||||||
{
|
{
|
||||||
_contentDialogOverlayWindow.Content = null;
|
_contentDialogOverlayWindow.Content = null;
|
||||||
_contentDialogOverlayWindow.Close();
|
_contentDialogOverlayWindow.Close();
|
||||||
|
_contentDialogOverlayWindow = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
|
@ -263,7 +263,7 @@ namespace Ryujinx.Ava.UI.Windows
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CheckLaunchState()
|
private async Task CheckLaunchState()
|
||||||
{
|
{
|
||||||
if (OperatingSystem.IsLinux() && LinuxHelper.VmMaxMapCount < LinuxHelper.RecommendedVmMaxMapCount)
|
if (OperatingSystem.IsLinux() && LinuxHelper.VmMaxMapCount < LinuxHelper.RecommendedVmMaxMapCount)
|
||||||
{
|
{
|
||||||
|
@ -271,23 +271,11 @@ namespace Ryujinx.Ava.UI.Windows
|
||||||
|
|
||||||
if (LinuxHelper.PkExecPath is not null)
|
if (LinuxHelper.PkExecPath is not null)
|
||||||
{
|
{
|
||||||
Dispatcher.UIThread.Post(async () =>
|
await Dispatcher.UIThread.InvokeAsync(ShowVmMaxMapCountDialog);
|
||||||
{
|
|
||||||
if (OperatingSystem.IsLinux())
|
|
||||||
{
|
|
||||||
await ShowVmMaxMapCountDialog();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Dispatcher.UIThread.Post(async () =>
|
await Dispatcher.UIThread.InvokeAsync(ShowVmMaxMapCountWarning);
|
||||||
{
|
|
||||||
if (OperatingSystem.IsLinux())
|
|
||||||
{
|
|
||||||
await ShowVmMaxMapCountWarning();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -304,12 +292,12 @@ namespace Ryujinx.Ava.UI.Windows
|
||||||
{
|
{
|
||||||
ShowKeyErrorOnLoad = false;
|
ShowKeyErrorOnLoad = false;
|
||||||
|
|
||||||
Dispatcher.UIThread.Post(async () => await UserErrorDialog.ShowUserErrorDialog(UserError.NoKeys));
|
await Dispatcher.UIThread.InvokeAsync(async () => await UserErrorDialog.ShowUserErrorDialog(UserError.NoKeys));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ConfigurationState.Instance.CheckUpdatesOnStart.Value && Updater.CanUpdate(false))
|
if (ConfigurationState.Instance.CheckUpdatesOnStart.Value && Updater.CanUpdate(false))
|
||||||
{
|
{
|
||||||
Updater.BeginParse(this, false).ContinueWith(task =>
|
await Updater.BeginParse(this, false).ContinueWith(task =>
|
||||||
{
|
{
|
||||||
Logger.Error?.Print(LogClass.Application, $"Updater Error: {task.Exception}");
|
Logger.Error?.Print(LogClass.Application, $"Updater Error: {task.Exception}");
|
||||||
}, TaskContinuationOptions.OnlyOnFaulted);
|
}, TaskContinuationOptions.OnlyOnFaulted);
|
||||||
|
@ -404,7 +392,9 @@ namespace Ryujinx.Ava.UI.Windows
|
||||||
|
|
||||||
LoadApplications();
|
LoadApplications();
|
||||||
|
|
||||||
|
#pragma warning disable CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed
|
||||||
CheckLaunchState();
|
CheckLaunchState();
|
||||||
|
#pragma warning restore CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SetMainContent(Control content = null)
|
private void SetMainContent(Control content = null)
|
||||||
|
|
Loading…
Reference in a new issue