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.Show();
|
||||
|
||||
// Load the game table if no application was requested by the command line
|
||||
if (CommandLineState.LaunchPathArg == null)
|
||||
{
|
||||
mainWindow.UpdateGameTable();
|
||||
}
|
||||
|
||||
if (OperatingSystem.IsLinux())
|
||||
{
|
||||
int currentVmMaxMapCount = LinuxHelper.VmMaxMapCount;
|
||||
|
|
|
@ -325,7 +325,6 @@ namespace Ryujinx.UI
|
|||
_hideUI.Label = _hideUI.Label.Replace("SHOWUIKEY", ConfigurationState.Instance.Hid.Hotkeys.Value.ShowUI.ToString());
|
||||
|
||||
UpdateColumns();
|
||||
UpdateGameTable();
|
||||
|
||||
ConfigurationState.Instance.UI.GameDirs.Event += (sender, args) =>
|
||||
{
|
||||
|
|
|
@ -37,6 +37,7 @@ namespace Ryujinx.Ava.UI.Windows
|
|||
internal static MainWindowViewModel MainWindowViewModel { get; private set; }
|
||||
|
||||
private bool _isLoading;
|
||||
private bool _applicationsLoadedOnce;
|
||||
|
||||
private UserChannelPersistence _userChannelPersistence;
|
||||
private static bool _deferLoad;
|
||||
|
@ -472,7 +473,11 @@ namespace Ryujinx.Ava.UI.Windows
|
|||
|
||||
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
|
||||
CheckLaunchState();
|
||||
|
@ -485,6 +490,12 @@ namespace Ryujinx.Ava.UI.Windows
|
|||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
@ -581,6 +592,7 @@ namespace Ryujinx.Ava.UI.Windows
|
|||
|
||||
public void LoadApplications()
|
||||
{
|
||||
_applicationsLoadedOnce = true;
|
||||
ViewModel.Applications.Clear();
|
||||
|
||||
StatusBarView.LoadProgressBar.IsVisible = true;
|
||||
|
|
Loading…
Add table
Reference in a new issue