Load applications when necessary
This prevents loading applications when launching an application directly from the command line (or a shortcut). Instead, applications will be loaded after the emulation was stopped by the user.
This commit is contained in:
parent
bcfe4f6b8a
commit
49e390b1d5
3 changed files with 19 additions and 2 deletions
|
@ -256,6 +256,12 @@ namespace Ryujinx
|
||||||
MainWindow mainWindow = new();
|
MainWindow mainWindow = new();
|
||||||
mainWindow.Show();
|
mainWindow.Show();
|
||||||
|
|
||||||
|
// Load the game table if no application was requested by the command line
|
||||||
|
if (CommandLineState.LaunchPathArg == null)
|
||||||
|
{
|
||||||
|
mainWindow.UpdateGameTable();
|
||||||
|
}
|
||||||
|
|
||||||
if (OperatingSystem.IsLinux())
|
if (OperatingSystem.IsLinux())
|
||||||
{
|
{
|
||||||
int currentVmMaxMapCount = LinuxHelper.VmMaxMapCount;
|
int currentVmMaxMapCount = LinuxHelper.VmMaxMapCount;
|
||||||
|
|
|
@ -325,7 +325,6 @@ namespace Ryujinx.UI
|
||||||
_hideUI.Label = _hideUI.Label.Replace("SHOWUIKEY", ConfigurationState.Instance.Hid.Hotkeys.Value.ShowUI.ToString());
|
_hideUI.Label = _hideUI.Label.Replace("SHOWUIKEY", ConfigurationState.Instance.Hid.Hotkeys.Value.ShowUI.ToString());
|
||||||
|
|
||||||
UpdateColumns();
|
UpdateColumns();
|
||||||
UpdateGameTable();
|
|
||||||
|
|
||||||
ConfigurationState.Instance.UI.GameDirs.Event += (sender, args) =>
|
ConfigurationState.Instance.UI.GameDirs.Event += (sender, args) =>
|
||||||
{
|
{
|
||||||
|
|
|
@ -37,6 +37,7 @@ namespace Ryujinx.Ava.UI.Windows
|
||||||
internal static MainWindowViewModel MainWindowViewModel { get; private set; }
|
internal static MainWindowViewModel MainWindowViewModel { get; private set; }
|
||||||
|
|
||||||
private bool _isLoading;
|
private bool _isLoading;
|
||||||
|
private bool _applicationsLoadedOnce;
|
||||||
|
|
||||||
private UserChannelPersistence _userChannelPersistence;
|
private UserChannelPersistence _userChannelPersistence;
|
||||||
private static bool _deferLoad;
|
private static bool _deferLoad;
|
||||||
|
@ -472,7 +473,11 @@ namespace Ryujinx.Ava.UI.Windows
|
||||||
|
|
||||||
ViewModel.RefreshFirmwareStatus();
|
ViewModel.RefreshFirmwareStatus();
|
||||||
|
|
||||||
LoadApplications();
|
// Load applications if no application was requested by the command line
|
||||||
|
if (!_deferLoad)
|
||||||
|
{
|
||||||
|
LoadApplications();
|
||||||
|
}
|
||||||
|
|
||||||
#pragma warning disable CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed
|
#pragma warning disable CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed
|
||||||
CheckLaunchState();
|
CheckLaunchState();
|
||||||
|
@ -485,6 +490,12 @@ namespace Ryujinx.Ava.UI.Windows
|
||||||
|
|
||||||
if (MainContent.Content != content)
|
if (MainContent.Content != content)
|
||||||
{
|
{
|
||||||
|
// Load applications while switching to the GameLibrary if we haven't done that yet
|
||||||
|
if (!_applicationsLoadedOnce && content == GameLibrary)
|
||||||
|
{
|
||||||
|
LoadApplications();
|
||||||
|
}
|
||||||
|
|
||||||
MainContent.Content = content;
|
MainContent.Content = content;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -581,6 +592,7 @@ namespace Ryujinx.Ava.UI.Windows
|
||||||
|
|
||||||
public void LoadApplications()
|
public void LoadApplications()
|
||||||
{
|
{
|
||||||
|
_applicationsLoadedOnce = true;
|
||||||
ViewModel.Applications.Clear();
|
ViewModel.Applications.Clear();
|
||||||
|
|
||||||
StatusBarView.LoadProgressBar.IsVisible = true;
|
StatusBarView.LoadProgressBar.IsVisible = true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue