From bf87f02c0c9aa24605cf825d94a0d675c737b87c Mon Sep 17 00:00:00 2001 From: Xpl0itR Date: Sat, 4 Jul 2020 00:29:36 +0100 Subject: [PATCH] Changes to game list reloading (#1334) * Only reload list when game dirs are changed * do not reload game list when game is loaded --- Ryujinx/Ui/MainWindow.cs | 10 +++++++++- Ryujinx/Ui/SettingsWindow.cs | 1 - 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Ryujinx/Ui/MainWindow.cs b/Ryujinx/Ui/MainWindow.cs index 8fa7dba7..cc615545 100644 --- a/Ryujinx/Ui/MainWindow.cs +++ b/Ryujinx/Ui/MainWindow.cs @@ -179,6 +179,14 @@ namespace Ryujinx.Ui UpdateColumns(); UpdateGameTable(); + ConfigurationState.Instance.Ui.GameDirs.Event += (sender, args) => + { + if (args.OldValue != args.NewValue) + { + UpdateGameTable(); + } + }; + Task.Run(RefreshFirmwareLabel); _statusBar.Hide(); @@ -313,7 +321,7 @@ namespace Ryujinx.Ui internal static void UpdateGameTable() { - if (_updatingGameTable) + if (_updatingGameTable || _gameLoaded) { return; } diff --git a/Ryujinx/Ui/SettingsWindow.cs b/Ryujinx/Ui/SettingsWindow.cs index 499ed101..e6d5c8df 100644 --- a/Ryujinx/Ui/SettingsWindow.cs +++ b/Ryujinx/Ui/SettingsWindow.cs @@ -438,7 +438,6 @@ namespace Ryujinx.Ui MainWindow.SaveConfig(); MainWindow.ApplyTheme(); - MainWindow.UpdateGameTable(); Dispose(); }