aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Gtk3/UI/MainWindow.cs
diff options
context:
space:
mode:
authorTSRBerry <20988865+TSRBerry@users.noreply.github.com>2024-08-03 23:31:34 +0200
committerGitHub <noreply@github.com>2024-08-03 22:31:34 +0100
commit263eb97f79f02db12c2499ceec7e957b91bc008b (patch)
tree5f0676b4d82e5c3851f923f4ba4f39066fb6b3b9 /src/Ryujinx.Gtk3/UI/MainWindow.cs
parent30049022574f0aecaa94c0f24c64f5c9f3fb7ad9 (diff)
Avoid race conditions while launching games directly from the command line (#7116)
* optimization: Load application metadata only for applications with IDs * 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. * Show the title in the configured language when launching an application * Rename DesiredTitleLanguage to DesiredLanguage
Diffstat (limited to 'src/Ryujinx.Gtk3/UI/MainWindow.cs')
-rw-r--r--src/Ryujinx.Gtk3/UI/MainWindow.cs9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/Ryujinx.Gtk3/UI/MainWindow.cs b/src/Ryujinx.Gtk3/UI/MainWindow.cs
index 7f9eceb3..66c0afae 100644
--- a/src/Ryujinx.Gtk3/UI/MainWindow.cs
+++ b/src/Ryujinx.Gtk3/UI/MainWindow.cs
@@ -187,7 +187,10 @@ namespace Ryujinx.UI
: IntegrityCheckLevel.None;
// Instantiate GUI objects.
- ApplicationLibrary = new ApplicationLibrary(_virtualFileSystem, checkLevel);
+ ApplicationLibrary = new ApplicationLibrary(_virtualFileSystem, checkLevel)
+ {
+ DesiredLanguage = ConfigurationState.Instance.System.Language,
+ };
_uiHandler = new GtkHostUIHandler(this);
_deviceExitStatus = new AutoResetEvent(false);
@@ -325,7 +328,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) =>
{
@@ -738,7 +740,8 @@ namespace Ryujinx.UI
Thread applicationLibraryThread = new(() =>
{
- ApplicationLibrary.LoadApplications(ConfigurationState.Instance.UI.GameDirs, ConfigurationState.Instance.System.Language);
+ ApplicationLibrary.DesiredLanguage = ConfigurationState.Instance.System.Language;
+ ApplicationLibrary.LoadApplications(ConfigurationState.Instance.UI.GameDirs);
_updatingGameTable = false;
})