From a4b5304935e87d9b7298cf4a3cc5e844020681bf Mon Sep 17 00:00:00 2001 From: Evan Husted Date: Sat, 15 Feb 2025 00:20:01 -0600 Subject: [PATCH 1/3] UI: Refresh game list when emulated Switch language is changed (to show different logos/names) --- .../UI/ViewModels/SettingsViewModel.cs | 23 +++++++------------ .../UI/Views/Settings/SettingsUIView.axaml.cs | 16 ++++--------- .../UI/Windows/SettingsWindow.axaml.cs | 2 +- 3 files changed, 14 insertions(+), 27 deletions(-) diff --git a/src/Ryujinx/UI/ViewModels/SettingsViewModel.cs b/src/Ryujinx/UI/ViewModels/SettingsViewModel.cs index 1b1f8a2a5..812438932 100644 --- a/src/Ryujinx/UI/ViewModels/SettingsViewModel.cs +++ b/src/Ryujinx/UI/ViewModels/SettingsViewModel.cs @@ -49,8 +49,7 @@ namespace Ryujinx.Ava.UI.ViewModels private int _graphicsBackendMultithreadingIndex; private float _volume; [ObservableProperty] private bool _isVulkanAvailable = true; - [ObservableProperty] private bool _gameDirectoryChanged; - [ObservableProperty] private bool _autoloadDirectoryChanged; + [ObservableProperty] private bool _gameListNeedsRefresh; private readonly List _gpuIds = []; private int _graphicsBackendIndex; private int _scalingFilter; @@ -593,16 +592,8 @@ namespace Ryujinx.Ava.UI.ViewModels config.HideCursor.Value = (HideCursorMode)HideCursor; config.UpdateCheckerType.Value = (UpdaterType)UpdateCheckerType; config.FocusLostActionType.Value = (FocusLostType)FocusLostActionType; - - if (GameDirectoryChanged) - { - config.UI.GameDirs.Value = [..GameDirectories]; - } - - if (AutoloadDirectoryChanged) - { - config.UI.AutoloadDirs.Value = [..AutoloadDirectories]; - } + config.UI.GameDirs.Value = [..GameDirectories]; + config.UI.AutoloadDirs.Value = [..AutoloadDirectories]; config.UI.BaseStyle.Value = BaseStyleIndex switch { @@ -623,8 +614,11 @@ namespace Ryujinx.Ava.UI.ViewModels // System config.System.Region.Value = (Region)Region; + + if (config.System.Language.Value != (Language)Language) + GameListNeedsRefresh = true; + config.System.Language.Value = (Language)Language; - if (_validTzRegions.Contains(TimeZone)) { config.System.TimeZone.Value = TimeZone; @@ -715,8 +709,7 @@ namespace Ryujinx.Ava.UI.ViewModels SaveSettingsEvent?.Invoke(); - GameDirectoryChanged = false; - AutoloadDirectoryChanged = false; + GameListNeedsRefresh = false; } private static void RevertIfNotSaved() diff --git a/src/Ryujinx/UI/Views/Settings/SettingsUIView.axaml.cs b/src/Ryujinx/UI/Views/Settings/SettingsUIView.axaml.cs index 22a4adf51..2b0e57cb5 100644 --- a/src/Ryujinx/UI/Views/Settings/SettingsUIView.axaml.cs +++ b/src/Ryujinx/UI/Views/Settings/SettingsUIView.axaml.cs @@ -36,11 +36,8 @@ namespace Ryujinx.Ava.UI.Views.Settings directories.Add(path); addDirBox.Clear(); - - if (isGameList) - ViewModel.GameDirectoryChanged = true; - else - ViewModel.AutoloadDirectoryChanged = true; + + ViewModel.GameListNeedsRefresh = true; } else { @@ -50,10 +47,7 @@ namespace Ryujinx.Ava.UI.Views.Settings { directories.Add(folder.Value.Path.LocalPath); - if (isGameList) - ViewModel.GameDirectoryChanged = true; - else - ViewModel.AutoloadDirectoryChanged = true; + ViewModel.GameListNeedsRefresh = true; } } } @@ -65,7 +59,7 @@ namespace Ryujinx.Ava.UI.Views.Settings foreach (string path in new List(GameDirsList.SelectedItems.Cast())) { ViewModel.GameDirectories.Remove(path); - ViewModel.GameDirectoryChanged = true; + ViewModel.GameListNeedsRefresh = true; } if (GameDirsList.ItemCount > 0) @@ -81,7 +75,7 @@ namespace Ryujinx.Ava.UI.Views.Settings foreach (string path in new List(AutoloadDirsList.SelectedItems.Cast())) { ViewModel.AutoloadDirectories.Remove(path); - ViewModel.AutoloadDirectoryChanged = true; + ViewModel.GameListNeedsRefresh = true; } if (AutoloadDirsList.ItemCount > 0) diff --git a/src/Ryujinx/UI/Windows/SettingsWindow.axaml.cs b/src/Ryujinx/UI/Windows/SettingsWindow.axaml.cs index 36f451fe4..701c3ddaf 100644 --- a/src/Ryujinx/UI/Windows/SettingsWindow.axaml.cs +++ b/src/Ryujinx/UI/Windows/SettingsWindow.axaml.cs @@ -45,7 +45,7 @@ namespace Ryujinx.Ava.UI.Windows { InputPage.InputView?.SaveCurrentProfile(); - if (Owner is MainWindow window && (ViewModel.GameDirectoryChanged || ViewModel.AutoloadDirectoryChanged)) + if (Owner is MainWindow window && ViewModel.GameListNeedsRefresh) { window.LoadApplications(); } From 7d59ada798ead183ffee96eb5f87cc92ebe6f4c5 Mon Sep 17 00:00:00 2001 From: Evan Husted Date: Sat, 15 Feb 2025 00:25:28 -0600 Subject: [PATCH 2/3] misc: chore: rename IgnoreApplet to IgnoreControllerApplet --- src/Ryujinx/Headless/Options.cs | 2 +- src/Ryujinx/UI/Applet/AvaHostUIHandler.cs | 2 +- src/Ryujinx/UI/ViewModels/SettingsViewModel.cs | 4 ++-- .../Utilities/Configuration/ConfigurationFileFormat.cs | 2 +- .../Utilities/Configuration/ConfigurationState.Migration.cs | 2 +- .../Utilities/Configuration/ConfigurationState.Model.cs | 6 +++--- src/Ryujinx/Utilities/Configuration/ConfigurationState.cs | 4 ++-- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/Ryujinx/Headless/Options.cs b/src/Ryujinx/Headless/Options.cs index a57863d5d..6658ba3ad 100644 --- a/src/Ryujinx/Headless/Options.cs +++ b/src/Ryujinx/Headless/Options.cs @@ -148,7 +148,7 @@ namespace Ryujinx.Headless IgnoreMissingServices = configurationState.System.IgnoreMissingServices; if (NeedsOverride(nameof(IgnoreControllerApplet))) - IgnoreControllerApplet = configurationState.System.IgnoreApplet; + IgnoreControllerApplet = configurationState.System.IgnoreControllerApplet; return; diff --git a/src/Ryujinx/UI/Applet/AvaHostUIHandler.cs b/src/Ryujinx/UI/Applet/AvaHostUIHandler.cs index c03c4c45f..c9bd08fa3 100644 --- a/src/Ryujinx/UI/Applet/AvaHostUIHandler.cs +++ b/src/Ryujinx/UI/Applet/AvaHostUIHandler.cs @@ -41,7 +41,7 @@ namespace Ryujinx.Ava.UI.Applet bool okPressed = false; - if (ConfigurationState.Instance.System.IgnoreApplet) + if (ConfigurationState.Instance.System.IgnoreControllerApplet) return false; Dispatcher.UIThread.InvokeAsync(async () => diff --git a/src/Ryujinx/UI/ViewModels/SettingsViewModel.cs b/src/Ryujinx/UI/ViewModels/SettingsViewModel.cs index 812438932..fe71a7420 100644 --- a/src/Ryujinx/UI/ViewModels/SettingsViewModel.cs +++ b/src/Ryujinx/UI/ViewModels/SettingsViewModel.cs @@ -526,7 +526,7 @@ namespace Ryujinx.Ava.UI.ViewModels EnableFsIntegrityChecks = config.System.EnableFsIntegrityChecks; DramSize = config.System.DramSize; IgnoreMissingServices = config.System.IgnoreMissingServices; - IgnoreApplet = config.System.IgnoreApplet; + IgnoreApplet = config.System.IgnoreControllerApplet; // CPU EnablePptc = config.System.EnablePtc; @@ -629,7 +629,7 @@ namespace Ryujinx.Ava.UI.ViewModels config.System.EnableFsIntegrityChecks.Value = EnableFsIntegrityChecks; config.System.DramSize.Value = DramSize; config.System.IgnoreMissingServices.Value = IgnoreMissingServices; - config.System.IgnoreApplet.Value = IgnoreApplet; + config.System.IgnoreControllerApplet.Value = IgnoreApplet; // CPU config.System.EnablePtc.Value = EnablePptc; diff --git a/src/Ryujinx/Utilities/Configuration/ConfigurationFileFormat.cs b/src/Ryujinx/Utilities/Configuration/ConfigurationFileFormat.cs index 7d9a4accb..814a48e53 100644 --- a/src/Ryujinx/Utilities/Configuration/ConfigurationFileFormat.cs +++ b/src/Ryujinx/Utilities/Configuration/ConfigurationFileFormat.cs @@ -183,7 +183,7 @@ namespace Ryujinx.Ava.Utilities.Configuration public bool ShowConfirmExit { get; set; } /// - /// ignore "Applet" dialog + /// Ignore Controller Applet dialog /// public bool IgnoreApplet { get; set; } diff --git a/src/Ryujinx/Utilities/Configuration/ConfigurationState.Migration.cs b/src/Ryujinx/Utilities/Configuration/ConfigurationState.Migration.cs index bf1e24ed8..e735c287b 100644 --- a/src/Ryujinx/Utilities/Configuration/ConfigurationState.Migration.cs +++ b/src/Ryujinx/Utilities/Configuration/ConfigurationState.Migration.cs @@ -100,7 +100,7 @@ namespace Ryujinx.Ava.Utilities.Configuration System.MemoryManagerMode.Value = cff.MemoryManagerMode; System.DramSize.Value = cff.DramSize; System.IgnoreMissingServices.Value = cff.IgnoreMissingServices; - System.IgnoreApplet.Value = cff.IgnoreApplet; + System.IgnoreControllerApplet.Value = cff.IgnoreApplet; System.UseHypervisor.Value = cff.UseHypervisor; UI.GuiColumns.FavColumn.Value = cff.GuiColumns.FavColumn; diff --git a/src/Ryujinx/Utilities/Configuration/ConfigurationState.Model.cs b/src/Ryujinx/Utilities/Configuration/ConfigurationState.Model.cs index 51c40cc99..3f22c6c0f 100644 --- a/src/Ryujinx/Utilities/Configuration/ConfigurationState.Model.cs +++ b/src/Ryujinx/Utilities/Configuration/ConfigurationState.Model.cs @@ -383,7 +383,7 @@ namespace Ryujinx.Ava.Utilities.Configuration /// /// Ignore Controller Applet /// - public ReactiveObject IgnoreApplet { get; private set; } + public ReactiveObject IgnoreControllerApplet { get; private set; } /// /// Uses Hypervisor over JIT if available @@ -424,8 +424,8 @@ namespace Ryujinx.Ava.Utilities.Configuration DramSize.LogChangesToValue(nameof(DramSize)); IgnoreMissingServices = new ReactiveObject(); IgnoreMissingServices.LogChangesToValue(nameof(IgnoreMissingServices)); - IgnoreApplet = new ReactiveObject(); - IgnoreApplet.LogChangesToValue(nameof(IgnoreApplet)); + IgnoreControllerApplet = new ReactiveObject(); + IgnoreControllerApplet.LogChangesToValue(nameof(IgnoreControllerApplet)); AudioVolume = new ReactiveObject(); AudioVolume.LogChangesToValue(nameof(AudioVolume)); UseHypervisor = new ReactiveObject(); diff --git a/src/Ryujinx/Utilities/Configuration/ConfigurationState.cs b/src/Ryujinx/Utilities/Configuration/ConfigurationState.cs index d810888a1..02a91e51d 100644 --- a/src/Ryujinx/Utilities/Configuration/ConfigurationState.cs +++ b/src/Ryujinx/Utilities/Configuration/ConfigurationState.cs @@ -81,7 +81,7 @@ namespace Ryujinx.Ava.Utilities.Configuration MemoryManagerMode = System.MemoryManagerMode, DramSize = System.DramSize, IgnoreMissingServices = System.IgnoreMissingServices, - IgnoreApplet = System.IgnoreApplet, + IgnoreApplet = System.IgnoreControllerApplet, UseHypervisor = System.UseHypervisor, GuiColumns = new GuiColumns { @@ -205,7 +205,7 @@ namespace Ryujinx.Ava.Utilities.Configuration System.MemoryManagerMode.Value = MemoryManagerMode.HostMappedUnsafe; System.DramSize.Value = MemoryConfiguration.MemoryConfiguration4GiB; System.IgnoreMissingServices.Value = false; - System.IgnoreApplet.Value = false; + System.IgnoreControllerApplet.Value = false; System.UseHypervisor.Value = true; Multiplayer.LanInterfaceId.Value = "0"; Multiplayer.Mode.Value = MultiplayerMode.Disabled; From 744d813b87e1c8ca6ae5ea7906474ea818c048fa Mon Sep 17 00:00:00 2001 From: Evan Husted Date: Sat, 15 Feb 2025 00:40:18 -0600 Subject: [PATCH 3/3] misc: i18n: change localization of Ignore Applet to Ignore Controller Applet & redo tooltip --- src/Ryujinx/Assets/locales.json | 78 +++++++++---------- .../Views/Settings/SettingsSystemView.axaml | 4 +- 2 files changed, 41 insertions(+), 41 deletions(-) diff --git a/src/Ryujinx/Assets/locales.json b/src/Ryujinx/Assets/locales.json index c6f474577..555c6d3c3 100644 --- a/src/Ryujinx/Assets/locales.json +++ b/src/Ryujinx/Assets/locales.json @@ -5148,28 +5148,28 @@ } }, { - "ID": "SettingsTabSystemIgnoreApplet", + "ID": "SettingsTabSystemIgnoreControllerApplet", "Translations": { "ar_SA": "", - "de_DE": "Applet ignorieren", - "el_GR": "Αγνοήστε το Applet", - "en_US": "Ignore Applet", - "es_ES": "Ignorar el Applet", - "fr_FR": "Ignorer la déconnexion de la manette", + "de_DE": "", + "el_GR": "", + "en_US": "Ignore Controller Applet", + "es_ES": "", + "fr_FR": "", "he_IL": "", - "it_IT": "Ignora l'applet", - "ja_JP": "アプレットを無視する", - "ko_KR": "애플릿 무시", - "no_NO": "Ignorer appleten", - "pl_PL": "Ignoruj ​​aplet", - "pt_BR": "Ignorar applet", - "ru_RU": "Игнорировать Апплет", - "sv_SE": "Ignorera applet", - "th_TH": "เมินเฉย Applet", + "it_IT": "", + "ja_JP": "", + "ko_KR": "", + "no_NO": "", + "pl_PL": "", + "pt_BR": "", + "ru_RU": "", + "sv_SE": "", + "th_TH": "", "tr_TR": "", - "uk_UA": "Ігнорувати Аплет", - "zh_CN": "忽略小程序", - "zh_TW": "忽略小程式" + "uk_UA": "", + "zh_CN": "", + "zh_TW": "" } }, { @@ -16523,28 +16523,28 @@ } }, { - "ID": "IgnoreAppletTooltip", + "ID": "IgnoreControllerAppletTooltip", "Translations": { - "ar_SA": "لن يظهر مربع الحوار الخارجي \"تطبيق وحدة التحكم\" إذا تم فصل لوحة الألعاب أثناء اللعب. ولن تظهر مطالبة بإغلاق مربع الحوار أو إعداد وحدة تحكم جديدة. وبمجرد إعادة توصيل وحدة التحكم التي تم فصلها سابقًا، ستستأنف اللعبة تلقائيًا.", - "de_DE": "Der externe Dialog \"Controller-Applet\" wird nicht angezeigt, wenn das Gamepad während des Spiels getrennt wird. Es erfolgt keine Aufforderung, den Dialog zu schließen oder einen neuen Controller einzurichten. Sobald der zuvor getrennte Controller wieder angeschlossen wird, wird das Spiel automatisch fortgesetzt.", - "el_GR": "Το εξωτερικό παράθυρο διαλόγου \"Ελεγκτής μικροεφαρμογής\" δεν θα εμφανιστεί εάν το gamepad αποσυνδεθεί κατά τη διάρκεια του παιχνιδιού. Δεν θα σας ζητηθεί να κλείσετε το παράθυρο διαλόγου ή να ρυθμίσετε έναν νέο ελεγκτή. Μόλις επανασυνδεθεί το χειριστήριο που είχε αποσυνδεθεί προηγουμένως, το παιχνίδι θα συνεχιστεί αυτόματα.", - "en_US": "The external dialog \"Controller Applet\" will not appear if the gamepad is disconnected during gameplay. There will be no prompt to close the dialog or set up a new controller. Once the previously disconnected controller is reconnected, the game will automatically resume.", - "es_ES": "El cuadro de diálogo externo \"Applet del controlador\" no aparecerá si el gamepad se desconecta durante el juego. No aparecerá ningún mensaje para cerrar el cuadro de diálogo o configurar un nuevo controlador. Una vez que se vuelva a conectar el controlador que se había desconectado anteriormente, el juego se reanudará automáticamente.", - "fr_FR": "La boîte de dialogue externe \"Programme Manette\" n'apparaîtra pas si la manette est déconnectée en jeu. Il n'y aura aucune boîte de dialogue ouverte pour configurer une nouvelle manette. Une fois que la manette précédemment déconnectée est reconnectée, le jeu reprendra automatiquement. \n\nLaissez désactivé en cas d'incertitude.", - "he_IL": "תיבת הדו-שיח החיצונית \"Controller Applet\" לא תופיע אם ה-Gamepad מנותק במהלך המשחק. לא תהיה הנחיה לסגור את תיבת הדו-שיח או להגדיר בקר חדש. ברגע שהבקר שנותק בעבר יתחבר מחדש, המשחק יתחדש אוטומטית.", - "it_IT": "La finestra di dialogo esterna \"Controller Applet\" non apparirà se il gamepad viene disconnesso durante il gioco. Non ci sarà alcun prompt per chiudere la finestra di dialogo o impostare un nuovo controller. Una volta che il controller disconnesso in precedenza viene ricollegato, il gioco riprenderà automaticamente.", - "ja_JP": "ゲームプレイ中にゲームパッドが切断された場合、外部ダイアログ「コントローラーアプレット」は表示されません。このダイアログを閉じるか、新しいコントローラーを設定するように求めるプロンプトは表示されません。以前に切断されたコントローラーが再接続されると、ゲームは自動的に再開されます。", - "ko_KR": "게임 플레이 중에 게임패드 연결이 끊어지면 외부 대화 상자 \"컨트롤러 애플릿\"이 나타나지 않습니다. 대화 상자를 닫거나 새 컨트롤러를 설정하라는 메시지가 표시되지 않습니다. 이전에 연결이 끊어진 컨트롤러가 다시 연결되면 게임이 자동으로 다시 시작됩니다.", - "no_NO": "Den eksterne dialogboksen «Controller Applet» vises ikke hvis gamepaden kobles fra under spilling. Du blir ikke bedt om å lukke dialogboksen eller konfigurere en ny kontroller. Når den tidligere frakoblede kontrolleren er koblet til igjen, fortsetter spillet automatisk.", - "pl_PL": "Zewnętrzny dialog \"Controller Applet\" nie pojawi się, jeśli gamepad zostanie odłączony podczas rozgrywki. Nie pojawi się monit o zamknięcie dialogu lub skonfigurowanie nowego kontrolera. Po ponownym podłączeniu poprzednio odłączonego kontrolera gra zostanie automatycznie wznowiona.", - "pt_BR": "O diálogo externo \"Controller Applet\" não aparecerá se o gamepad for desconectado durante o jogo. Não haverá prompt para fechar o diálogo ou configurar um novo controle. Assim que o controle desconectado anteriormente for reconectado, o jogo será retomado automaticamente.", - "ru_RU": "Внешний диалог \"Апплет контроллера\" не появится, если геймпад будет отключен во время игры. Не будет предложено закрыть диалог или настроить новый контроллер. После повторного подключения ранее отключенного контроллера игра автоматически возобновится.", - "sv_SE": "Den externa dialogen \"Handkontroller-applet\" kommer inte att visas om din gamepad är frånkopplad under spel. Det finns ingen fråga att stänga dialogen eller konfigurera en ny handkontroller. När den tidigare frånkopplade handkontrollern återansluts så kommer spelet att automatiskt återupptas.", - "th_TH": "กล่องโต้ตอบภายนอก \"แอปเพล็ตตัวควบคุม\" จะไม่ปรากฏขึ้นหากแป้นเกมถูกตัดการเชื่อมต่อระหว่างการเล่นเกม จะไม่มีข้อความแจ้งให้ปิดกล่องโต้ตอบหรือตั้งค่าตัวควบคุมใหม่ เมื่อเชื่อมต่อคอนโทรลเลอร์ที่ตัดการเชื่อมต่อก่อนหน้านี้อีกครั้ง เกมจะดำเนินการต่อโดยอัตโนมัติ", - "tr_TR": "Oyun sırasında oyun kumandasının bağlantısı kesilirse, harici \"Controller Applet\" iletişim kutusu görünmez. İletişim kutusunu kapatma veya yeni bir kumanda ayarlama isteği olmaz. Daha önce bağlantısı kesilen kumanda tekrar bağlandığında oyun otomatik olarak devam eder.", - "uk_UA": "Зовнішнє діалогове вікно \"Аплет контролера\" не з’являтиметься, якщо геймпад буде від’єднано під час гри. Не буде запиту закрити діалогове вікно чи налаштувати новий контролер. Після повторного підключення раніше від’єднаного контролера гра автоматично відновиться.", - "zh_CN": "如果游戏手柄在游戏过程中断开连接,则不会出现外部对话框“控制器小程序”。不会提示关闭对话框或设置新控制器。一旦先前断开连接的控制器重新连接,游戏将自动恢复。", - "zh_TW": "如果遊戲手把在遊戲過程中斷開連接,則外部對話方塊「控制器小程式」將不會出現。不會提示關閉對話方塊或設定新控制器。一旦先前斷開的控制器重新連接,遊戲將自動恢復。" + "ar_SA": "", + "de_DE": "", + "el_GR": "", + "en_US": "The Controller Applet dialog will not appear if the gamepad is disconnected while an application is running.\n\nLeave OFF if unsure.", + "es_ES": "", + "fr_FR": "", + "he_IL": "", + "it_IT": "", + "ja_JP": "", + "ko_KR": "", + "no_NO": "", + "pl_PL": "", + "pt_BR": "", + "ru_RU": "", + "sv_SE": "", + "th_TH": "", + "tr_TR": "", + "uk_UA": "", + "zh_CN": "", + "zh_TW": "" } }, { diff --git a/src/Ryujinx/UI/Views/Settings/SettingsSystemView.axaml b/src/Ryujinx/UI/Views/Settings/SettingsSystemView.axaml index aa7144cf1..7a9a55848 100644 --- a/src/Ryujinx/UI/Views/Settings/SettingsSystemView.axaml +++ b/src/Ryujinx/UI/Views/Settings/SettingsSystemView.axaml @@ -316,8 +316,8 @@ - + ToolTip.Tip="{ext:Locale IgnoreControllerAppletTooltip}"> +