0
0
Fork 0

Changes to game list reloading (#1334)

* Only reload list when game dirs are changed

* do not reload game list when game is loaded
This commit is contained in:
Xpl0itR 2020-07-04 00:29:36 +01:00 committed by GitHub
parent 7cb6532971
commit bf87f02c0c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

View file

@ -179,6 +179,14 @@ namespace Ryujinx.Ui
UpdateColumns(); UpdateColumns();
UpdateGameTable(); UpdateGameTable();
ConfigurationState.Instance.Ui.GameDirs.Event += (sender, args) =>
{
if (args.OldValue != args.NewValue)
{
UpdateGameTable();
}
};
Task.Run(RefreshFirmwareLabel); Task.Run(RefreshFirmwareLabel);
_statusBar.Hide(); _statusBar.Hide();
@ -313,7 +321,7 @@ namespace Ryujinx.Ui
internal static void UpdateGameTable() internal static void UpdateGameTable()
{ {
if (_updatingGameTable) if (_updatingGameTable || _gameLoaded)
{ {
return; return;
} }

View file

@ -438,7 +438,6 @@ namespace Ryujinx.Ui
MainWindow.SaveConfig(); MainWindow.SaveConfig();
MainWindow.ApplyTheme(); MainWindow.ApplyTheme();
MainWindow.UpdateGameTable();
Dispose(); Dispose();
} }