Ava: Fix regressions by rewriting CheckLaunchState (#5728)
This commit is contained in:
parent
4744bde0e5
commit
7f2fb049f5
1 changed files with 26 additions and 12 deletions
|
@ -265,33 +265,47 @@ namespace Ryujinx.Ava.UI.Windows
|
||||||
|
|
||||||
private void CheckLaunchState()
|
private void CheckLaunchState()
|
||||||
{
|
{
|
||||||
if (ShowKeyErrorOnLoad)
|
|
||||||
{
|
|
||||||
ShowKeyErrorOnLoad = false;
|
|
||||||
|
|
||||||
UserErrorDialog.ShowUserErrorDialog(UserError.NoKeys).Wait();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (OperatingSystem.IsLinux() && LinuxHelper.VmMaxMapCount < LinuxHelper.RecommendedVmMaxMapCount)
|
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})");
|
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)
|
if (LinuxHelper.PkExecPath is not null)
|
||||||
{
|
{
|
||||||
ShowVmMaxMapCountDialog().Wait();
|
Dispatcher.UIThread.Post(async () =>
|
||||||
|
{
|
||||||
|
if (OperatingSystem.IsLinux())
|
||||||
|
{
|
||||||
|
await ShowVmMaxMapCountDialog();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ShowVmMaxMapCountWarning().Wait();
|
Dispatcher.UIThread.Post(async () =>
|
||||||
|
{
|
||||||
|
if (OperatingSystem.IsLinux())
|
||||||
|
{
|
||||||
|
await ShowVmMaxMapCountWarning();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!ShowKeyErrorOnLoad)
|
||||||
|
{
|
||||||
if (_deferLoad)
|
if (_deferLoad)
|
||||||
{
|
{
|
||||||
_deferLoad = false;
|
_deferLoad = false;
|
||||||
|
|
||||||
ViewModel.LoadApplication(_launchPath, _startFullscreen).Wait();
|
ViewModel.LoadApplication(_launchPath, _startFullscreen).Wait();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ShowKeyErrorOnLoad = false;
|
||||||
|
|
||||||
|
Dispatcher.UIThread.Post(async () => await UserErrorDialog.ShowUserErrorDialog(UserError.NoKeys));
|
||||||
|
}
|
||||||
|
|
||||||
if (ConfigurationState.Instance.CheckUpdatesOnStart.Value && Updater.CanUpdate(false))
|
if (ConfigurationState.Instance.CheckUpdatesOnStart.Value && Updater.CanUpdate(false))
|
||||||
{
|
{
|
||||||
|
|
Reference in a new issue