diff options
author | Ac_K <Acoustik666@gmail.com> | 2023-09-26 07:17:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-26 07:17:55 +0200 |
commit | 7f2fb049f5392fcefca326a3754170cb7f9d8403 (patch) | |
tree | 15f6fdb9fe3e3a6013b3c0f07d4ed92d6e59daea /src | |
parent | 4744bde0e59578baeb5f94126087953f6d8ddba0 (diff) |
Ava: Fix regressions by rewriting CheckLaunchState (#5728)1.1.1031
Diffstat (limited to 'src')
-rw-r--r-- | src/Ryujinx.Ava/UI/Windows/MainWindow.axaml.cs | 38 |
1 files changed, 26 insertions, 12 deletions
diff --git a/src/Ryujinx.Ava/UI/Windows/MainWindow.axaml.cs b/src/Ryujinx.Ava/UI/Windows/MainWindow.axaml.cs index 3596c9aa..c78f4160 100644 --- a/src/Ryujinx.Ava/UI/Windows/MainWindow.axaml.cs +++ b/src/Ryujinx.Ava/UI/Windows/MainWindow.axaml.cs @@ -265,32 +265,46 @@ namespace Ryujinx.Ava.UI.Windows private void CheckLaunchState() { - if (ShowKeyErrorOnLoad) - { - ShowKeyErrorOnLoad = false; - - UserErrorDialog.ShowUserErrorDialog(UserError.NoKeys).Wait(); - } - if (OperatingSystem.IsLinux() && LinuxHelper.VmMaxMapCount < LinuxHelper.RecommendedVmMaxMapCount) { Logger.Warning?.Print(LogClass.Application, $"The value of vm.max_map_count is lower than {LinuxHelper.RecommendedVmMaxMapCount}. ({LinuxHelper.VmMaxMapCount})"); if (LinuxHelper.PkExecPath is not null) { - ShowVmMaxMapCountDialog().Wait(); + Dispatcher.UIThread.Post(async () => + { + if (OperatingSystem.IsLinux()) + { + await ShowVmMaxMapCountDialog(); + } + }); } else { - ShowVmMaxMapCountWarning().Wait(); + Dispatcher.UIThread.Post(async () => + { + if (OperatingSystem.IsLinux()) + { + await ShowVmMaxMapCountWarning(); + } + }); } } - if (_deferLoad) + if (!ShowKeyErrorOnLoad) + { + if (_deferLoad) + { + _deferLoad = false; + + ViewModel.LoadApplication(_launchPath, _startFullscreen).Wait(); + } + } + else { - _deferLoad = false; + ShowKeyErrorOnLoad = false; - ViewModel.LoadApplication(_launchPath, _startFullscreen).Wait(); + Dispatcher.UIThread.Post(async () => await UserErrorDialog.ShowUserErrorDialog(UserError.NoKeys)); } if (ConfigurationState.Instance.CheckUpdatesOnStart.Value && Updater.CanUpdate(false)) |