From 8ee675cd6251a591bd9604c84b2eeab6db097f5f Mon Sep 17 00:00:00 2001 From: VewDev <36-VewDev@users.noreply.git.ryujinx.app> Date: Fri, 29 Aug 2025 20:40:46 +0200 Subject: [PATCH] feat: add fallback to Classic Ryugay for app icon --- src/Ryujinx/UI/RyujinxApp.axaml.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/Ryujinx/UI/RyujinxApp.axaml.cs b/src/Ryujinx/UI/RyujinxApp.axaml.cs index ae8c03e72..0ae1a964e 100644 --- a/src/Ryujinx/UI/RyujinxApp.axaml.cs +++ b/src/Ryujinx/UI/RyujinxApp.axaml.cs @@ -185,7 +185,18 @@ namespace Ryujinx.Ava public static void UpdateAppIcon(string newIconName) { - ApplicationIcon selectedIcon = AvailableApplicationIcons.First(x => x.Name == newIconName); + if (newIconName.IsNullOrEmpty()) + { + newIconName = "Classic Ryugay"; + } + + ApplicationIcon selectedIcon = AvailableApplicationIcons.FirstOrDefault(x => x.Name == newIconName); + if (selectedIcon == null) + { + // Fallback to default icon if the selected one is not found + UpdateAppIcon("Classic Ryugay"); + } + Stream activeIconStream = EmbeddedResources.GetStream(selectedIcon.FullPath); if (activeIconStream != null) {