diff --git a/assets/locales.json b/assets/locales.json index 406e6b646..9da7fe28c 100644 --- a/assets/locales.json +++ b/assets/locales.json @@ -14643,6 +14643,156 @@ "zh_TW": "為獲得最佳效能,建議停用著色器傾印。您是否要立即停用著色器傾印嗎?" } }, + { + "ID": "NotificationLaunchCheckDramSizeTitle", + "Translations": { + "ar_SA": "", + "de_DE": "", + "el_GR": "", + "en_US": "{0} DRAM Enabled", + "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": "" + } + }, + { + "ID": "NotificationLaunchCheckDramSizeMessage", + "Translations": { + "ar_SA": "", + "de_DE": "", + "el_GR": "", + "en_US": "Using above 4GiB DRAM may cause crashes in some applications.", + "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": "" + } + }, + { + "ID": "NotificationLaunchCheckGdbStubTitle", + "Translations": { + "ar_SA": "", + "de_DE": "", + "el_GR": "", + "en_US": "Debug: GDB Stub Enabled (Port: {0})", + "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": "" + } + }, + { + "ID": "NotificationLaunchCheckGdbStubMessage", + "Translations": { + "ar_SA": "", + "de_DE": "", + "el_GR": "", + "en_US": "This will affect performance.", + "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": "" + } + }, + { + "ID": "NotificationLaunchCheckSuspendOnStartTitle", + "Translations": { + "ar_SA": "", + "de_DE": "", + "el_GR": "", + "en_US": "Debug: Suspend on Start Enabled", + "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": "" + } + }, + { + "ID": "NotificationLaunchCheckSuspendOnStartMessage", + "Translations": { + "ar_SA": "", + "de_DE": "", + "el_GR": "", + "en_US": "Application has been suspended. Attach a debugger to continue.", + "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": "" + } + }, { "ID": "DialogLoadAppGameAlreadyLoadedMessage", "Translations": { diff --git a/src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs b/src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs index bab09efc4..7f12a6119 100644 --- a/src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs +++ b/src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs @@ -1622,6 +1622,7 @@ namespace Ryujinx.Ava.UI.ViewModels #if RELEASE await PerformanceCheck(); #endif + PreLaunchNotification(); Logger.RestartTime(); @@ -1855,6 +1856,47 @@ namespace Ryujinx.Ava.UI.ViewModels } } + /// + /// Show non-intrusive notifications for options that may cause side effects. + /// + public static void PreLaunchNotification() + { + if (ConfigurationState.Instance.Debug.DebuggerSuspendOnStart.Value) + { + NotificationHelper.ShowInformation( + LocaleManager.Instance[LocaleKeys.NotificationLaunchCheckSuspendOnStartTitle], + LocaleManager.Instance[LocaleKeys.NotificationLaunchCheckSuspendOnStartMessage]); + } + + if (ConfigurationState.Instance.Debug.EnableGdbStub.Value) + { + NotificationHelper.ShowInformation( + LocaleManager.Instance.UpdateAndGetDynamicValue(LocaleKeys.NotificationLaunchCheckGdbStubTitle, ConfigurationState.Instance.Debug.GdbStubPort.Value), + LocaleManager.Instance[LocaleKeys.NotificationLaunchCheckGdbStubMessage]); + } + + if (ConfigurationState.Instance.System.DramSize.Value != MemoryConfiguration.MemoryConfiguration4GiB) + { + var MemoryConfigurationLocaleKey = ConfigurationState.Instance.System.DramSize.Value switch + { + MemoryConfiguration.MemoryConfiguration4GiB or + MemoryConfiguration.MemoryConfiguration4GiBAppletDev or + MemoryConfiguration.MemoryConfiguration4GiBSystemDev => LocaleKeys.SettingsTabSystemDramSize4GiB, + MemoryConfiguration.MemoryConfiguration6GiB or + MemoryConfiguration.MemoryConfiguration6GiBAppletDev => LocaleKeys.SettingsTabSystemDramSize6GiB, + MemoryConfiguration.MemoryConfiguration8GiB => LocaleKeys.SettingsTabSystemDramSize8GiB, + MemoryConfiguration.MemoryConfiguration12GiB => LocaleKeys.SettingsTabSystemDramSize12GiB, + _ => LocaleKeys.SettingsTabSystemDramSize4GiB, + }; + + var MemoryConfigurationLocale = LocaleManager.Instance[MemoryConfigurationLocaleKey]; + + NotificationHelper.ShowWarning( + LocaleManager.Instance.UpdateAndGetDynamicValue(LocaleKeys.NotificationLaunchCheckDramSizeTitle, MemoryConfigurationLocale), + LocaleManager.Instance[LocaleKeys.NotificationLaunchCheckDramSizeMessage]); + } + } + public async void ProcessTrimResult(String filename, XCIFileTrimmer.OperationOutcome operationOutcome) { string notifyUser = operationOutcome.ToLocalisedText();