From abfbc6f4bce273b9d1b9fe7aa69310dc23a5863f Mon Sep 17 00:00:00 2001 From: Evan Husted Date: Thu, 16 Jan 2025 09:52:01 -0600 Subject: [PATCH 1/3] UI: Prevent desynced RPC when toggling it off/on while in-game --- src/Ryujinx/DiscordIntegrationModule.cs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/Ryujinx/DiscordIntegrationModule.cs b/src/Ryujinx/DiscordIntegrationModule.cs index ee00f2c0d..2b462c27f 100644 --- a/src/Ryujinx/DiscordIntegrationModule.cs +++ b/src/Ryujinx/DiscordIntegrationModule.cs @@ -1,4 +1,5 @@ using DiscordRPC; +using Gommon; using Humanizer; using Humanizer.Localisation; using Ryujinx.Ava.Utilities.AppLibrary; @@ -75,11 +76,23 @@ namespace Ryujinx.Ava _discordClient = new DiscordRpcClient(ApplicationId); _discordClient.Initialize(); - _discordClient.SetPresence(_discordPresenceMain); + + Use(TitleIDs.CurrentApplication); } } } + public static void Use(Optional titleId) + { + if (titleId.TryGet(out string tid)) + SwitchToPlayingState( + ApplicationLibrary.LoadAndSaveMetaData(tid), + Switch.Shared.Processes.ActiveApplication + ); + else + SwitchToMainState(); + } + private static void SwitchToPlayingState(ApplicationMetadata appMeta, ProcessResult procRes) { _discordClient?.SetPresence(new RichPresence From 01ccd18726a127c513a24c832cd00791db9a5e32 Mon Sep 17 00:00:00 2001 From: Evan Husted Date: Thu, 16 Jan 2025 09:52:35 -0600 Subject: [PATCH 2/3] UI: Meant to use that method in another place [ci-skip] --- src/Ryujinx/DiscordIntegrationModule.cs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/Ryujinx/DiscordIntegrationModule.cs b/src/Ryujinx/DiscordIntegrationModule.cs index 2b462c27f..040d61ecf 100644 --- a/src/Ryujinx/DiscordIntegrationModule.cs +++ b/src/Ryujinx/DiscordIntegrationModule.cs @@ -46,16 +46,7 @@ namespace Ryujinx.Ava }; ConfigurationState.Instance.EnableDiscordIntegration.Event += Update; - TitleIDs.CurrentApplication.Event += (_, e) => - { - if (e.NewValue) - SwitchToPlayingState( - ApplicationLibrary.LoadAndSaveMetaData(e.NewValue), - Switch.Shared.Processes.ActiveApplication - ); - else - SwitchToMainState(); - }; + TitleIDs.CurrentApplication.Event += (_, e) => Use(e.NewValue); } private static void Update(object sender, ReactiveEventArgs evnt) From 1018c9db8b02c94dcad69ef13f2144bf21793606 Mon Sep 17 00:00:00 2001 From: Daenorth Date: Thu, 16 Jan 2025 17:02:33 +0100 Subject: [PATCH 3/3] Update Norwegian Translation (#503) Norwegian translation updated with the Compatibility list addition --- src/Ryujinx/Assets/locales.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Ryujinx/Assets/locales.json b/src/Ryujinx/Assets/locales.json index 6bfb566fe..194c79b21 100644 --- a/src/Ryujinx/Assets/locales.json +++ b/src/Ryujinx/Assets/locales.json @@ -10435,7 +10435,7 @@ "it_IT": "Finestra di input", "ja_JP": "入力ダイアログ", "ko_KR": "대화 상자 입력", - "no_NO": "", + "no_NO": "Dialogboksen Inndata", "pl_PL": "Okno Dialogowe Wprowadzania", "pt_BR": "Diálogo de texto", "ru_RU": "Диалоговое окно ввода", @@ -22635,7 +22635,7 @@ "it_IT": "", "ja_JP": "", "ko_KR": "이 호환성 목록에는 오래된 항목이 포함되어 있을 수 있습니다.\n\"게임 내\" 상태에서 게임을 테스트하는 것을 반대하지 마십시오.", - "no_NO": "", + "no_NO": "Denne kompatibilitetslisten kan inneholde oppføringer som er tomme for data.\nVær ikke imot å teste spill i statusen «Ingame».", "pl_PL": "", "pt_BR": "", "ru_RU": "", @@ -22660,7 +22660,7 @@ "it_IT": "", "ja_JP": "", "ko_KR": "호환성 항목 검색...", - "no_NO": "", + "no_NO": "Søk i kompatibilitetsoppføringer...", "pl_PL": "", "pt_BR": "", "ru_RU": "", @@ -22685,7 +22685,7 @@ "it_IT": "", "ja_JP": "", "ko_KR": "호환성 목록 열기", - "no_NO": "", + "no_NO": "Åpne kompatibilitetslisten", "pl_PL": "", "pt_BR": "", "ru_RU": "", @@ -22710,7 +22710,7 @@ "it_IT": "", "ja_JP": "", "ko_KR": "보유 게임만 표시", - "no_NO": "", + "no_NO": "Vis bare eide spill", "pl_PL": "", "pt_BR": "", "ru_RU": "", @@ -22735,7 +22735,7 @@ "it_IT": "", "ja_JP": "", "ko_KR": "플레이 가능", - "no_NO": "", + "no_NO": "Spillbar", "pl_PL": "", "pt_BR": "", "ru_RU": "", @@ -22785,7 +22785,7 @@ "it_IT": "", "ja_JP": "", "ko_KR": "메뉴", - "no_NO": "", + "no_NO": "Menyer", "pl_PL": "", "pt_BR": "", "ru_RU": "", @@ -22810,7 +22810,7 @@ "it_IT": "", "ja_JP": "", "ko_KR": "부츠", - "no_NO": "", + "no_NO": "Starter", "pl_PL": "", "pt_BR": "", "ru_RU": "", @@ -22835,7 +22835,7 @@ "it_IT": "", "ja_JP": "", "ko_KR": "없음", - "no_NO": "", + "no_NO": "Ingenting", "pl_PL": "", "pt_BR": "", "ru_RU": "",